Skip to content

Instantly share code, notes, and snippets.

View maraca's full-sized avatar

Martin Cozzi maraca

View GitHub Profile
@maraca
maraca / gist:760145
Created December 30, 2010 19:05
Make option
make_option('--database', action='store', dest='database',
@maraca
maraca / main.py
Created February 2, 2011 23:51
Shows entries in DataStore for an appengine application. use /populate/ to add 1000 entries. each entry is representend with the timestamp
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@maraca
maraca / main.py
Created February 3, 2011 00:12
Fetching with datastore & memcached
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@maraca
maraca / main.py
Created February 3, 2011 00:13
Just datastore
#!/usr/bin/env python
#
# Copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
@maraca
maraca / gist:844398
Created February 25, 2011 19:59
Display items nicely
#!/usr/bin/python2.6
# Copyright (c) 2011, Formspring.me.
"""Enter brief description here.
Enter more details here about this file.
"""
__author__ = 'martin@formspring.me'
if __name__ == '__main__':
chocolate 1
banana 10
sirup 20
blah 120
#!/usr/bin/python2.6
from setuptools import setup
setup(
name='gisty',
version='0.1',
description='Upload your code to gist.github.com based on https://gist.github.com/763188',
keywords='Gist Github',
package_dir = {'': 'src'},
#!/usr/bin/python2.6
from setuptools import setup
setup(
name='gisty',
version='0.1',
description='Upload your code to gist.github.com based on https://gist.github.com/763188',
keywords='Gist Github',
package_dir = {'': 'src'},
Hi gisty!
#!/usr/bin/python2.6
import random
values = range(0, 10000)
customers = []
unpaid_customers = []
# generate a bunch of random values between 0 - 1000
for value in values: