[google-appengine] Re: Error in importing blobstore

2011-03-08 Thread Savraj
Experiencing the same issue, can't import 'util'.

On Mar 8, 10:32 am, andreas schmid  wrote:
> these random import issues are related to the latest issues. some of my apps 
> are back to normal while others are still having weird import problems.
> there is nothing else to do than wait and hope right now
>
> On Mar 8, 2011, at 4:17 PM, jay wrote:
>
>
>
> > Hi
>
> > An application that has been running fine .. is suddenly giving me a server 
> > 500 error.
> > No change has been made to the application. When I look at the logs - it is 
> > pointing to
> > a line which is importing the blobstore.
>
> > from google.appengine.ext import blobstore
>
> > 1) Can you please tell me what is happening to my 
> > app?http://rzoozx.appspot.com?
> > 2) Is this related to a runtime issue that is being worked on now? or Is 
> > this my problem?
>
> > 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 
> > google-appengine+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
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: Change db.IntegerProperty() to db.FloatProperty()?

2009-06-22 Thread Savraj

Thanks Nick and Tony for your help and clarification.  I will look in
to potential migration options in that article you sent, Tony.  Never
use int for something that might be a float! ;)

-savraj

On Jun 22, 2:00 pm, Tony  wrote:
> http://code.google.com/appengine/articles/update_schema.htmldescribes
> one technique for updating your schema.
>
> On Jun 22, 12:13 pm, "Nick Johnson (Google)" 
> wrote:
>
> > Hi Savraj,
>
> > If you change your property from db.IntegerProperty to db.FloatProperty, all
> > your existing entities will fail to validate, and throw exceptions when
> > loaded. If you want to make this change, you need to transition all your
> > existing entities before making the update.
>
> > -Nick Johnson
>
> > On Mon, Jun 22, 2009 at 5:04 PM, Savraj  wrote:
>
> > > Hi App Engine-ers,
>
> > > So I've got a ton of data stored in my db -- and I've got a particular
> > > field, let's call it 'value' set as 'db.IntegerProperty()' in my model
> > > definition.  If I change this to 'db.FloatProperty()', what happens?
>
> > > I would imagine that the existing values in the db remain Integers,
> > > while the new ones coming in are floats, and that should be fine for
> > > my purposes. But will it work?  I suppose the only way to know is try,
> > > but I don't want to mangle my database, which has quite a bit of data
> > > in it.
>
> > > What will happen in this case?
>
> > > -s
>
> > --
> > Nick Johnson, App Engine Developer Programs Engineer
> > Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number:
> > 368047
--~--~-~--~~~---~--~~
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] Change db.IntegerProperty() to db.FloatProperty()?

2009-06-22 Thread Savraj

Hi App Engine-ers,

So I've got a ton of data stored in my db -- and I've got a particular
field, let's call it 'value' set as 'db.IntegerProperty()' in my model
definition.  If I change this to 'db.FloatProperty()', what happens?

I would imagine that the existing values in the db remain Integers,
while the new ones coming in are floats, and that should be fine for
my purposes. But will it work?  I suppose the only way to know is try,
but I don't want to mangle my database, which has quite a bit of data
in it.

What will happen in this case?

-s

--~--~-~--~~~---~--~~
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: custom handle_exception -- where do I get the traceback?

2009-03-15 Thread Savraj

http://sites.google.com/site/io/best-practices---building-a-production-quality-application-on-google-app-engine

On Mar 15, 5:44 pm, "Steve Robillard" 
wrote:
> The talk sounds interesting can you provide a link?
>
> -Original Message-
> From: google-appengine@googlegroups.com
>
> [mailto:google-appeng...@googlegroups.com] On Behalf Of Savraj
> Sent: Sunday, March 15, 2009 4:26 PM
> To: Google App Engine
> Subject: [google-appengine] custom handle_exception -- where do I get the
> traceback?
>
> I'm watching the excellent talk by Ken Ashcraft, and I'm on slide 7
> implementing "send email upon exception"
>
> I'm almost there, but I can't populate my traceback variable... Where do I
> get it from?  I've basically matched the code in the slides -- but the
> slides don't say where "traceback" comes from...
>
> -s
>
> class BaseRH(webapp.RequestHandler):
>         def handle_exception(self, exception, debug_mode):
>                 lines = ''.join(traceback.format_exception(*sys.exc_info()))
>                                      ERROR HERE, traceback not
> defined
>                 logging.error(lines)
>                 admin_mail("Exception",lines)
>
>                 template_values = {}
>                 if users.is_current_user_admin():
>                         template_values['traceback'] = lines
>                 self.response.out.write(template.render('error.html',
> template_values))
--~--~-~--~~~---~--~~
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: custom handle_exception -- where do I get the traceback?

2009-03-15 Thread Savraj

Answered my own question, again... import sys, traceback...

Writing up the problem really helps find an answer.

-s

On Mar 15, 1:26 pm, Savraj  wrote:
> I'm watching the excellent talk by Ken Ashcraft, and I'm on slide 7
> implementing "send email upon exception"
>
> I'm almost there, but I can't populate my traceback variable... Where
> do I get it from?  I've basically matched the code in the slides --
> but the slides don't say where "traceback" comes from...
>
> -s
>
> class BaseRH(webapp.RequestHandler):
>         def handle_exception(self, exception, debug_mode):
>                 lines = ''.join(traceback.format_exception(*sys.exc_info()))
>                                      ERROR HERE, traceback not
> defined
>                 logging.error(lines)
>                 admin_mail("Exception",lines)
>
>                 template_values = {}
>                 if users.is_current_user_admin():
>                         template_values['traceback'] = lines
>                 self.response.out.write(template.render('error.html',
> template_values))
--~--~-~--~~~---~--~~
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] custom handle_exception -- where do I get the traceback?

2009-03-15 Thread Savraj

I'm watching the excellent talk by Ken Ashcraft, and I'm on slide 7
implementing "send email upon exception"

I'm almost there, but I can't populate my traceback variable... Where
do I get it from?  I've basically matched the code in the slides --
but the slides don't say where "traceback" comes from...

-s

class BaseRH(webapp.RequestHandler):
def handle_exception(self, exception, debug_mode):
lines = ''.join(traceback.format_exception(*sys.exc_info()))
 ERROR HERE, traceback not
defined
logging.error(lines)
admin_mail("Exception",lines)

template_values = {}
if users.is_current_user_admin():
template_values['traceback'] = lines
self.response.out.write(template.render('error.html',
template_values))
--~--~-~--~~~---~--~~
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: Forms and ReferenceProperty question

2009-02-17 Thread Savraj

Answered my own question--

Add the following to ModelB:

def __unicode__(self):
   return self.modelBReadableName

(basically have the unicode method return the property with the
readable name of ModelB)...

-s

On Feb 17, 3:03 pm, Savraj  wrote:
> I'm using webapp, it's totally awesome. One quick question.
>
> So I have a model, ModelA, and one of the properties for ModelA is
> "itemtype," a reference property that references an instance of
> ModelB.
>
> When I create a form to edit the properties of an instance of ModelA,
> I get a dropdown box for "itemtype" that let's me choose the instance
> of Model B. Awesome!!! Totally awesome, automatic behavior.
>
> One problem though -- The instances of Model B are listed as
> ", 0x12321123>, etc"
>
> I know the fix is to override the form field for 'itemtype' in my
> ModelAForm class -- but since webapp is doing some cool magic here I'm
> not sure of the correct override.  Can someone help?
>
> Thanks for your help!!!
>
> -S
> palo alto, ca
--~--~-~--~~~---~--~~
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: New Limits for Several App Engine Operations

2009-02-17 Thread Savraj

Thank You! Mad Respect and Love to the app engine team.

-s

On Feb 17, 2:47 am, Jodok  Batlogg  wrote:
> awesome! thanks!
>
> jodok
>
> On Feb 13, 11:13 pm, "Marce (Google)"  wrote:
>
> > For those of you who haven't already heard, we're very excited
> > yesterday to have announced that we've raised limits on several App
> > Engine operations:
>
> >     * No more "High CPU Requests"! App Engine Apps were once allowed
> > no more than 2 CPU-intensive requests per minute. We've made some
> > adjustments to the way we handle requests, and have eliminated this
> > limitation altogether. To learn more about how this works and the
> > implications for your app, see our documentation.
> >     * Response deadline raised to 30 seconds. The amount of time an
> > App Engine app can take to respond to an incoming request has been
> > raised from 10 to 30 seconds! There are limits on the number of
> > simultaneous active requests an application can process at any given
> > moment--see our docs to learn more.
> >     * Size limits on code files, static files, and requests/responses
> > raised to 10MB! App Engine apps can now receive requests and send
> > responses of up to 10MB in size, and users can upload 10MB code and
> > static files as well. Note that API requests (e.g. memcache.set(),
> > db.put()) are still limited to 1MB in size.
>
> > These changes were inspired and driven by a great deal of developer
> > feedback, and we're not done! Please let us know what you'd like to
> > see next on App Engine .
>
>
--~--~-~--~~~---~--~~
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] Forms and ReferenceProperty question

2009-02-17 Thread Savraj

I'm using webapp, it's totally awesome. One quick question.

So I have a model, ModelA, and one of the properties for ModelA is
"itemtype," a reference property that references an instance of
ModelB.

When I create a form to edit the properties of an instance of ModelA,
I get a dropdown box for "itemtype" that let's me choose the instance
of Model B. Awesome!!! Totally awesome, automatic behavior.

One problem though -- The instances of Model B are listed as
",, etc"

I know the fix is to override the form field for 'itemtype' in my
ModelAForm class -- but since webapp is doing some cool magic here I'm
not sure of the correct override.  Can someone help?

Thanks for your help!!!

-S
palo alto, ca
--~--~-~--~~~---~--~~
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: Problem with memcache.get_multi

2009-02-09 Thread Savraj

My bad.  Was using incorrect keys.  Works great now.

-s

On Jan 29, 4:44 pm, Savraj  wrote:
> Hi folks,
>
> I'm having a very curious problem with get_multi.  I'm giving it a
> list of keys ten items long.  It finds items 1 and 2 without issue,
> but doesn't find the last eight.
>
> If I reverse the search list and then use get_multi, I now get items 9
> and 10, but not 8 through 1.
>
> If I make individual calls to memcache.get in a loop, I manage to get
> back all 10 items.  ;)
>
> My code was working great before, and I've only been running in to
> this problem today.  The only difference is that my memcache entries
> now hold a bunch more data than before -- which I suspect may be the
> issue?  Though I'm not getting any errors when storing the items, and
> they can all be recovered individually. Any help?
>
> Thanks for your help!Savraj
> (currently in palo alto, ca :))
--~--~-~--~~~---~--~~
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] Problem with memcache.get_multi

2009-01-29 Thread Savraj

Hi folks,

I'm having a very curious problem with get_multi.  I'm giving it a
list of keys ten items long.  It finds items 1 and 2 without issue,
but doesn't find the last eight.

If I reverse the search list and then use get_multi, I now get items 9
and 10, but not 8 through 1.

If I make individual calls to memcache.get in a loop, I manage to get
back all 10 items.  ;)

My code was working great before, and I've only been running in to
this problem today.  The only difference is that my memcache entries
now hold a bunch more data than before -- which I suspect may be the
issue?  Though I'm not getting any errors when storing the items, and
they can all be recovered individually. Any help?

Thanks for your help!
Savraj
(currently in palo alto, ca :))
--~--~-~--~~~---~--~~
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: sanitizing user submitted HTML

2009-01-28 Thread Savraj

Super -- I used Dave's technique above and it totally works -- just
copy the html5lib directory into your source tree.

-s

On Jan 22, 12:21 pm, Chris Tan  wrote:
> Hi Dave,
>
> Html5liblooks like a well maintained and active project.
> The stack overflow clone white-lists a subset of the default safe
> elements (e.g. no button elements) which looks alright to me.  Of
> course, I'm no expert at this, so don't quote me on that :)
>
> Thanks for sharing,
>
> Chris
>
> On Jan 21, 4:36 pm, Dave  wrote:
>
> > Thanks Chris and Alexander,
>
> > I took a look at both... from the links I also 
> > foundhttp://code.google.com/p/soclone/source/browse/trunk/soclone/utils/ht...
> > which useshtml5lib. It puts a wrapper onhtml5liband helped me
> > figure out how  to make it work.
>
> > What is wicked cool is that what appeared to be a nightmare seems to
> > work just great. For others attempting same thing do this:
> > 1- get & installhtml5lib. Note: phthon manage.py install failed for
> > me so i just copied it to my project folder.
> > 2- get the code from link above and save it file in your project (i.e.
> > htmlsanitize.py)
> > 3- I run the code as a clean in my forms(i.e. def clean_comment) such
> > as below:
>
> >         def clean_comment(self):
> >                 import htmlsanitize
> >                 data = 
> > htmlsanitize.sanitize_html(self.cleaned_data['comment'])
> >                 return data
>
> > So far so good for me.
>
> > Would love to hear 'thumbs up' or 'thumbs down' if this is a good
> > approach.
>
> > thx again
>
> > Dave
>
> > Chris Tan wrote:
> > > Check out:
> > >http://feedparser.org/docs/html-sanitization.html
>
> > > On Jan 21, 2:47 pm, Dave  wrote:
> > > > There must be an easy answer for this problem and I almost feel dumb
> > > > for asking BUT I can't figure it out and have spent too much time
> > > > trying. The scenerio is a comment/blog situation. I am using tinyMCE
> > > > which is creating 'trustable' html. I can display this with django by
> > > > using {{field|safe}}... all is good.
>
> > > > The problem is some bozo will have their way with the textarea by
> > > > turning of their javascript. So I'm trying to figure out best way to
> > > > sanitize the data. The normal escaping of data won't work because it
> > > > clobbers the 'good' html from tinyMCE. Anyway would be good to
> > > > sanitize even the tinyMCE generated html.
>
> > > > I've been looking at using html5 lib/parser but can't seem to get it
> > > > to work. I've even gone through creating a replace method to escape
> > > > everything and then put back the 'good' tags. However, that seems like
> > > > a round-about way to go and get's really nasty when considering img,
> > > > span, etc. tags tinyMCE creates so nicely. Surely many have come
> > > > across this and there an easy answer.
>
> > > > All suggestions and recommendations are greatly appreciated.
>
> > > > thx,
>
> > > > Dave
>
>
--~--~-~--~~~---~--~~
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: OSX Leopard "NotImplementedError: Unable to find the Python PIL library."

2009-01-15 Thread Savraj

I got it working using this link as well. I tried the default
instructions but they complained that "system python 2.5" was not
installed.

On Jan 8, 8:38 am, "Rodrigo Moraes"  wrote:
> On Thu, Jan 8, 2009 at 7:11 AM, PatHaugen wrote:
> > Anyone get this to cleanly work as documented by Google?
>
> not me. this is how i got it working:
>
> http://appengine-cookbook.appspot.com/recipe/install-pil-in-mac-os-x
>
> -- rodrigo
--~--~-~--~~~---~--~~
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: Is there any example code about paging?

2008-12-04 Thread Savraj

Hi folks. Just wanted to add that there should be some "known good
way" of paging through a set of more than 1,000 objects. It seems like
there are a few ways to do this -- does anyone have any good sample
code so we don't all reinvent the wheel each time?

One way is to use Django's Paginator -- I've used that in one of my
apps.  But it doesn't solve the problem if you have more than 1,000
items (the max returned by a query).

-s

On Dec 4, 6:45 am, kang <[EMAIL PROTECTED]> wrote:
> I know both...But the example apps do not cover the paging problem..
> and the big apps do not give source code
>
>
>
> On Thu, Dec 4, 2008 at 7:44 PM, A. TNG <[EMAIL PROTECTED]> wrote:
>
> > On Thu, Dec 4, 2008 at 6:58 PM, lookon <[EMAIL PROTECTED]> wrote:
>
> > > I've watched Buildding Scalable Web Applications with Google App
> > > Engine  on Youtube..But I wish there could be some example code about
> > > the topics. for example paging technique..
>
> > > And I want to know where could see the code of some big apps using App
> > > Engine. I need to learn, thanks
>
> > Some sample apps you could find here
> >http://code.google.com/p/google-app-engine-samples/downloads/list.
> > Some big apps you could find herehttp://appgallery.appspot.com/. But
> > the big one may not open-source.
>
> > --
> > Best Regards,
> > TANG Jiyu (Blog:http://jiyu.wordpress.com.cn)
>
> --
> Stay hungry,Stay foolish.
--~--~-~--~~~---~--~~
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: Django Forms - Can I set a key_name?

2008-11-08 Thread Savraj

I have found a workaround -- but I would still like to know if this is
possible.

On Nov 6, 11:58 am, Savraj <[EMAIL PROTECTED]> wrote:
> Hey folks. I love app engine!
>
> Quick question -- I am using DjangoFormsto create an entity, as
> explained here:
>
> http://code.google.com/appengine/articles/djangoforms.html
>
> Can Isetthis new entity'skey_name?  It's not clear from the
> documentation.  I want tosetthe key name so I can quickly look up
> the entity in the future using Model.get_by_key_name.  Thanks in
> advance for your help!
>
> -savraj
--~--~-~--~~~---~--~~
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] Django Forms - Can I set a key_name?

2008-11-06 Thread Savraj

Hey folks. I love app engine!

Quick question -- I am using Django Forms to create an entity, as
explained here:

http://code.google.com/appengine/articles/djangoforms.html

Can I set this new entity's key_name?  It's not clear from the
documentation.  I want to set the key name so I can quickly look up
the entity in the future using Model.get_by_key_name.  Thanks in
advance for your help!

-savraj
--~--~-~--~~~---~--~~
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: Dealing with lots of data -- any tips?

2008-09-26 Thread Savraj

Thanks for the reply Mahmoud.Your proposal is good, but yes it
does mean I would make many queries which could be time consuming.

Another alternative I'm considering is simply trading space for time
-- that is, on save of a new data point, save out some averages for
broader periods (min, hour, day, etc). This way I could get fewer
points back, if I just look at hourly averages over 3 days...

Thanks again.

-s

On Sep 26, 3:03 pm, Mahmoud <[EMAIL PROTECTED]> wrote:
> If you're trying to infer some type of statistical information from
> the dataset after it has been stored, then this might be difficult,
> especially in the absence of background/offline processing.
>
> However, here is something you might want to try, for the particular
> scenario you describe:
> 1. Create an indexable property for each entity/entry as you store
> it.
> Looking at your data, it looks like the timestamp is sufficient,
> because each entry has a unique timestamp so you won't have to worry
> about breaking ties.
>
> 2. You now want to fetch 1000 entities at known intervals. So
> extrapolate the timestamps of where those entities fall and fetch
> them. Unfortunately, this means that you have to make 1000 queries (I
> believe the datastore queues queries up, to a max of 35), so you might
> have to do this in multiple requests, and append the entities you
> fetch each time to a list.
>
> On Sep 25, 11:46 am, Savraj <[EMAIL PROTECTED]> wrote:
>
> > So I have stored some data in the app-engine database, with new data
> > every 5 seconds.
>
> > example dataset:
>
> > ID - Time - Value
> > 1 - 9/20/2008 16:00:00 - 100
> > 2 - 9/20/2008 16:00:05 - 120
> > 3 - 9/20/2008 16:00:10 - 130
> > 4 - 9/20/2008 16:00:15 - 250
> > ...
> > 17278 - 9/21/2008 15:59:60 - 200
> > 17279 - 9/21/2008 15:59:55 - 100
> > 17280 - 9/21/2008 16:00:00 - 220
>
> > How do I get just 1000 values back that cover the entire recorded
> > period, so I can put them in a chart? What sort of query should I
> > construct?  I imagine it's something like, 'give me every 20th value'
> > -- but how do I express than in a query?
>
> > Thanks in advance for your kindness and consideration.
>
> > - s
--~--~-~--~~~---~--~~
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] Dealing with lots of data -- any tips?

2008-09-25 Thread Savraj

So I have stored some data in the app-engine database, with new data
every 5 seconds.

example dataset:

ID - Time - Value
1 - 9/20/2008 16:00:00 - 100
2 - 9/20/2008 16:00:05 - 120
3 - 9/20/2008 16:00:10 - 130
4 - 9/20/2008 16:00:15 - 250
...
17278 - 9/21/2008 15:59:60 - 200
17279 - 9/21/2008 15:59:55 - 100
17280 - 9/21/2008 16:00:00 - 220

How do I get just 1000 values back that cover the entire recorded
period, so I can put them in a chart? What sort of query should I
construct?  I imagine it's something like, 'give me every 20th value'
-- but how do I express than in a query?

Thanks in advance for your kindness and consideration.

- s
--~--~-~--~~~---~--~~
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: ROR, PHP and Amazon Web services

2008-09-25 Thread Savraj Singh

Yeah, it would be nice to know Google's app-engine plans.

I'm a RoR and PHP developer learning Python because app-engine is
cool... But if app-engine is just going to support Rails in the
future, then I feel like I'm wasting my time now.

App engine team -- do let us know what you're planning!

- s

On Sep 23, 1:36 pm, student_thesis <[EMAIL PROTECTED]> wrote:
> Hello
>
> We are evaluating google app engine for one of our projects.
>
> Will ROR, PHP be supported, if so when is it in google app engine
> roadmap?
>
> Amazon S3 is creating a lot of buzz and picking up users in ec2, s3
> etc
>
> Does google have its heart in sharing its infrastructure long term?
>
> We are a business, and we are looking for some commitment from google
> on this.
>
> 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: user objects different based on email case?

2008-08-28 Thread Savraj Singh

Hi Alexander,

Yes, that's how I'm storing the users. Let's say I have five users
that all store UserInfo. I call users.get_current_user() to get the
user and then save the Info.  My problem is accessing a user's
information again, when that user is not logged in.

The documentation says, "A User object with an email address that
doesn't correspond to a valid Google account can be stored in the
datastore, but will never match a real user."  That implies to me that
a user object with an email address that does correspond to a valid
google account will match a real user.  But I guess that's too much of
a leap? What's the point of these user objects constructed from emails
if they don't match real users?

Again thank you all for reading -- I'll come up with some other
strategy to approach this.

- savraj




On Aug 28, 7:48 pm, Alexander Kojevnikov <[EMAIL PROTECTED]>
wrote:
> As far as I can see, there's very little point in storing User
> instances constructed from an e-mail address. These instances don't
> correspond to real Google accounts, GAE doesn't do anything special to
> verify the validity of supplied e-mail addresses, and basically it
> just stores the e-mail addresses as strings.
>
> If you want your User instances to correspond to real accounts you
> need to use users.get_current_user(). If not, I suppose it's less
> confusing to just store the (lower-cased) e-mail addresses in a string
> property.
>
> On Aug 29, 6:53 am, Savraj Singh <[EMAIL PROTECTED]> wrote:
>
> > Yes, I can do that, thanks -- but I still think this behavior is a
> > problem.
>
> > Let's say I create a datastore model:
>
> > class UserInfo(db.Model):
> >         owner = db.UserProperty()
> >         Info = db.StringProperty()
>
> > Now let's say I create a UserInfo entity with owner set as user1 and
> > save it to the datastore.
>
> > I can't look up this saved entity unless I match the case of the
> > original email address (user2 will not match it). That's the problem.
>
> > I discovered this problem because when I assign owners in parts of my
> > application, sometimes Google capitalizes the email addresses, and
> > other times, it does not.
>
> > I can resort to using strings, but that defeats the purpose of having
> > a special 'userProperty' that abstracts away this stuff.
>
> > Thanks for your help, everyone.
>
> > - s
>
> > On Aug 28, 4:30 pm, Davide Rognoni <[EMAIL PROTECTED]> wrote:
>
> > > str(user1).lower() == str(user2).lower()
>
> > > On Aug 28, 6:35 pm, Savraj Singh <[EMAIL PROTECTED]> wrote:
>
> > > > Hi everyone, quick question.
>
> > > > class Tests(webapp.RequestHandler):
> > > >         def get(self):
> > > >                 user1 = users.User(email="[EMAIL PROTECTED]")
> > > >                 user2 = users.User(email="[EMAIL PROTECTED]")
>
> > > >                 if user1 == user2:
> > > >                         self.response.out.write("users are the same")
> > > >                 else:
> > > >                         self.response.out.write("users are different")
>
> > > > The result is that "users are different" -- I'm surprised by that.
> > > > Shouldn't they be the same? Especially savraj and Savraj both point to
> > > > my valid google account?  I can work around this issue but according
> > > > to the API documentation I would assume that user1 and user2 are
> > > > equal.
>
> > > > Thanks for your help!
>
> > > > -Savraj
--~--~-~--~~~---~--~~
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: user objects different based on email case?

2008-08-28 Thread Savraj Singh

Yes, I can do that, thanks -- but I still think this behavior is a
problem.

Let's say I create a datastore model:

class UserInfo(db.Model):
owner = db.UserProperty()
Info = db.StringProperty()

Now let's say I create a UserInfo entity with owner set as user1 and
save it to the datastore.

I can't look up this saved entity unless I match the case of the
original email address (user2 will not match it). That's the problem.

I discovered this problem because when I assign owners in parts of my
application, sometimes Google capitalizes the email addresses, and
other times, it does not.

I can resort to using strings, but that defeats the purpose of having
a special 'userProperty' that abstracts away this stuff.

Thanks for your help, everyone.

- s


On Aug 28, 4:30 pm, Davide Rognoni <[EMAIL PROTECTED]> wrote:
> str(user1).lower() == str(user2).lower()
>
> On Aug 28, 6:35 pm, Savraj Singh <[EMAIL PROTECTED]> wrote:
>
> > Hi everyone, quick question.
>
> > class Tests(webapp.RequestHandler):
> >         def get(self):
> >                 user1 = users.User(email="[EMAIL PROTECTED]")
> >                 user2 = users.User(email="[EMAIL PROTECTED]")
>
> >                 if user1 == user2:
> >                         self.response.out.write("users are the same")
> >                 else:
> >                         self.response.out.write("users are different")
>
> > The result is that "users are different" -- I'm surprised by that.
> > Shouldn't they be the same? Especially savraj and Savraj both point to
> > my valid google account?  I can work around this issue but according
> > to the API documentation I would assume that user1 and user2 are
> > equal.
>
> > Thanks for your help!
>
> > -Savraj
--~--~-~--~~~---~--~~
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] user objects different based on email case?

2008-08-28 Thread Savraj Singh

Hi everyone, quick question.

class Tests(webapp.RequestHandler):
def get(self):
user1 = users.User(email="[EMAIL PROTECTED]")
user2 = users.User(email="[EMAIL PROTECTED]")

if user1 == user2:
self.response.out.write("users are the same")
else:
self.response.out.write("users are different")

The result is that "users are different" -- I'm surprised by that.
Shouldn't they be the same? Especially savraj and Savraj both point to
my valid google account?  I can work around this issue but according
to the API documentation I would assume that user1 and user2 are
equal.

Thanks for your help!

-Savraj


--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---