code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
#coding=utf8
from django.db import models
class Address(models.Model):
name = models.CharField(max_length=20)
address = models.CharField(max_length=100)
pub_date = models.DateField()
| [
[
1,
0,
0.2857,
0.1429,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
3,
0,
0.7857,
0.5714,
0,
0.66,
1,
149,
0,
0,
0,
0,
996,
0,
3
],
[
14,
1,
0.7143,
0.1429,
1,
0.54,
... | [
"from django.db import models",
"class Address(models.Model):\n name = models.CharField(max_length=20)\n address = models.CharField(max_length=100)\n pub_date = models.DateField()",
" name = models.CharField(max_length=20)",
" address = models.CharField(max_length=100)",
" pub_date = models.Date... |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
from django.conf.urls.defaults import patterns, url
__author__ = 'Administrator'
urlpatterns = patterns('address.views',
url(r'^test/$','test')
) | [
[
1,
0,
0.1667,
0.1667,
0,
0.66,
0,
341,
0,
2,
0,
0,
341,
0,
0
],
[
14,
0,
0.5,
0.1667,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.8333,
0.5,
0,
0.66,
... | [
"from django.conf.urls.defaults import patterns, url",
"__author__ = 'Administrator'",
"urlpatterns = patterns('address.views',\n url(r'^test/$','test')\n)"
] |
from django.contrib import admin
from address.models import Address
__author__ = 'Administrator'
admin.site.register(Address) | [
[
1,
0,
0.2,
0.2,
0,
0.66,
0,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.4,
0.2,
0,
0.66,
0.3333,
980,
0,
1,
0,
0,
980,
0,
0
],
[
14,
0,
0.6,
0.2,
0,
0.66,
0.6667,... | [
"from django.contrib import admin",
"from address.models import Address",
"__author__ = 'Administrator'",
"admin.site.register(Address)"
] |
# Create your views here.
import urllib2
from django.http import HttpResponse
from django.shortcuts import render_to_response
from models import Address
def latest_address(request):
addresslist = Address.objects.order_by('-pub_date')[:10]
return render_to_response('latest_address.html', {'addresslist':... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
345,
0,
1,
0,
0,
345,
0,
0
],
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0.2,
779,
0,
1,
0,
0,
779,
0,
0
],
[
1,
0,
0.2857,
0.0714,
0,
0.6... | [
"import urllib2",
"from django.http import HttpResponse",
"from django.shortcuts import render_to_response",
"from models import Address",
"def latest_address(request):\n addresslist = Address.objects.order_by('-pub_date')[:10]\n return render_to_response('latest_address.html', {'addresslist':addressl... |
from BeautifulSoup import BeautifulSoup
__author__ = 'Administrator'
import urllib,urllib2,cookielib
from BeautifulSoup import BeautifulSoup
myCookie = urllib2.HTTPCookieProcessor(cookielib.CookieJar())
openner = urllib2.build_opener(myCookie)
post_data = {'email':'yinjj472@nenu.edu.cn',
'pass... | [
[
1,
0,
0.0312,
0.0312,
0,
0.66,
0,
878,
0,
1,
0,
0,
878,
0,
0
],
[
14,
0,
0.0938,
0.0312,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1562,
0.0312,
0,
0... | [
"from BeautifulSoup import BeautifulSoup",
"__author__ = 'Administrator'",
"import urllib,urllib2,cookielib",
"from BeautifulSoup import BeautifulSoup",
"myCookie = urllib2.HTTPCookieProcessor(cookielib.CookieJar())",
"openner = urllib2.build_opener(myCookie)",
"post_data = {'email':'yinjj472@nenu.edu.c... |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0.25,
201,
0,
1,
0,
0,
201,
0,
0
],
[
7,
0,
0.4643,
0.4286,
0,
0.... | [
"from django.core.management import execute_manager",
"import imp",
"try:\n imp.find_module('settings') # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized thi... |
from django.db import models
# Create your models here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
]
] | [
"from django.db import models"
] |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
__author__ = 'Administrator'
from django.http import HttpResponse
def index(request):
return HttpResponse("hello, Django.\n jiajia.yin, you must work hard for programing!") | [
[
14,
0,
0.2,
0.2,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4,
0.2,
0,
0.66,
0.5,
779,
0,
1,
0,
0,
779,
0,
0
],
[
2,
0,
0.9,
0.4,
0,
0.66,
1,
780,
... | [
"__author__ = 'Administrator'",
"from django.http import HttpResponse",
"def index(request):\n return HttpResponse(\"hello, Django.\\n jiajia.yin, you must work hard for programing!\")",
" return HttpResponse(\"hello, Django.\\n jiajia.yin, you must work hard for programing!\")"
] |
__author__ = 'Administrator'
from django.http import HttpResponse
text = '''<form method="post" action="add">
<input type="text" name="a" value="%d"></input> + <input type="text" name="b" value="%d"></input>
<input type="submit" value="="></input> <input type="text" name="c" value="%d"></input>
</form>''... | [
[
14,
0,
0.0625,
0.0625,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.125,
0.0625,
0,
0.66,
0.3333,
779,
0,
1,
0,
0,
779,
0,
0
],
[
14,
0,
0.3438,
0.25,
0,
0.6... | [
"__author__ = 'Administrator'",
"from django.http import HttpResponse",
"text = '''<form method=\"post\" action=\"add\">\n <input type=\"text\" name=\"a\" value=\"%d\"></input> + <input type=\"text\" name=\"b\" value=\"%d\"></input>\n <input type=\"submit\" value=\"=\"></input> <input type=\"text\" name=\... |
#coding=utf-8
__author__ = 'Administrator'
from django.shortcuts import render_to_response
address = [
{'name':'张三', 'address':'地址一'},
{'name':'李四', 'address':'地址二'}
]
def index(request):
return render_to_response('list.html', {'address': address}) | [
[
14,
0,
0.1818,
0.0909,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2727,
0.0909,
0,
0.66,
0.3333,
852,
0,
1,
0,
0,
852,
0,
0
],
[
14,
0,
0.5909,
0.3636,
0,
... | [
"__author__ = 'Administrator'",
"from django.shortcuts import render_to_response",
"address = [\n {'name':'张三', 'address':'地址一'},\n {'name':'李四', 'address':'地址二'}\n]",
"def index(request):\n return render_to_response('list.html', {'address': address})",
" return render_to_response('list.html', {... |
# Create your views here.
| [] | [] |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0.25,
201,
0,
1,
0,
0,
201,
0,
0
],
[
7,
0,
0.4643,
0.4286,
0,
0.... | [
"from django.core.management import execute_manager",
"import imp",
"try:\n imp.find_module('settings') # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized thi... |
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'DjangoDemo.views.home', name='home'),
# url(r'^DjangoDemo/', include('DjangoD... | [
[
1,
0,
0.0476,
0.0476,
0,
0.66,
0,
341,
0,
3,
0,
0,
341,
0,
0
],
[
1,
0,
0.1905,
0.0476,
0,
0.66,
0.3333,
302,
0,
1,
0,
0,
302,
0,
0
],
[
8,
0,
0.2381,
0.0476,
0,
... | [
"from django.conf.urls.defaults import patterns, include, url",
"from django.contrib import admin",
"admin.autodiscover()",
"urlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'DjangoDemo.views.home', name='home'),\n # url(r'^DjangoDemo/', include('DjangoDemo.foo.urls')),\n\n # Uncomment the ... |
# Django settings for DjangoDemo project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'orac... | [
[
14,
0,
0.0208,
0.0069,
0,
0.66,
0,
309,
1,
0,
0,
0,
0,
4,
0
],
[
14,
0,
0.0278,
0.0069,
0,
0.66,
0.0435,
7,
2,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0486,
0.0208,
0,
0.6... | [
"DEBUG = True",
"TEMPLATE_DEBUG = DEBUG",
"ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)",
"MANAGERS = ADMINS",
"DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'test', ... |
from django.db import models
# Create your models here.
class wiki(models.Model):
pagename = models.CharField(max_length=20, unique=True)
content = models.TextField()
| [
[
1,
0,
0.1667,
0.1667,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
3,
0,
0.8333,
0.5,
0,
0.66,
1,
910,
0,
0,
0,
0,
996,
0,
2
],
[
14,
1,
0.8333,
0.1667,
1,
0.85,
... | [
"from django.db import models",
"class wiki(models.Model):\n pagename = models.CharField(max_length=20, unique=True)\n content = models.TextField()",
" pagename = models.CharField(max_length=20, unique=True)",
" content = models.TextField()"
] |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
# Create your views here.
#coding=utf8
from wiki.models import wiki
from django.template import loader
from django.template import context
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
def index(request, pagename=""):
if ... | [
[
1,
0,
0.25,
0.0833,
0,
0.66,
0,
400,
0,
1,
0,
0,
400,
0,
0
],
[
1,
0,
0.3333,
0.0833,
0,
0.66,
0.1667,
213,
0,
1,
0,
0,
213,
0,
0
],
[
1,
0,
0.4167,
0.0833,
0,
0.... | [
"from wiki.models import wiki",
"from django.template import loader",
"from django.template import context",
"from django.http import HttpResponse",
"from django.http import HttpResponseRedirect",
"from django.shortcuts import render_to_response",
"def index(request, pagename=\"\"):\n if pagename:\n ... |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0.25,
201,
0,
1,
0,
0,
201,
0,
0
],
[
7,
0,
0.4643,
0.4286,
0,
0.... | [
"from django.core.management import execute_manager",
"import imp",
"try:\n imp.find_module('settings') # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized thi... |
from django.db import models
# Create your models here.
| [
[
1,
0,
0.3333,
0.3333,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
]
] | [
"from django.db import models"
] |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
__author__ = 'Administrator'
from django.http import HttpResponse
def index(request):
return HttpResponse("hello, Django.\n jiajia.yin, you must work hard for programing!") | [
[
14,
0,
0.2,
0.2,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4,
0.2,
0,
0.66,
0.5,
779,
0,
1,
0,
0,
779,
0,
0
],
[
2,
0,
0.9,
0.4,
0,
0.66,
1,
780,
... | [
"__author__ = 'Administrator'",
"from django.http import HttpResponse",
"def index(request):\n return HttpResponse(\"hello, Django.\\n jiajia.yin, you must work hard for programing!\")",
" return HttpResponse(\"hello, Django.\\n jiajia.yin, you must work hard for programing!\")"
] |
__author__ = 'Administrator'
from django.http import HttpResponse
text = '''<form method="post" action="add">
<input type="text" name="a" value="%d"></input> + <input type="text" name="b" value="%d"></input>
<input type="submit" value="="></input> <input type="text" name="c" value="%d"></input>
</form>''... | [
[
14,
0,
0.0625,
0.0625,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.125,
0.0625,
0,
0.66,
0.3333,
779,
0,
1,
0,
0,
779,
0,
0
],
[
14,
0,
0.3438,
0.25,
0,
0.6... | [
"__author__ = 'Administrator'",
"from django.http import HttpResponse",
"text = '''<form method=\"post\" action=\"add\">\n <input type=\"text\" name=\"a\" value=\"%d\"></input> + <input type=\"text\" name=\"b\" value=\"%d\"></input>\n <input type=\"submit\" value=\"=\"></input> <input type=\"text\" name=\... |
#coding=utf-8
__author__ = 'Administrator'
from django.shortcuts import render_to_response
address = [
{'name':'张三', 'address':'地址一'},
{'name':'李四', 'address':'地址二'}
]
def index(request):
return render_to_response('list.html', {'address': address}) | [
[
14,
0,
0.1818,
0.0909,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2727,
0.0909,
0,
0.66,
0.3333,
852,
0,
1,
0,
0,
852,
0,
0
],
[
14,
0,
0.5909,
0.3636,
0,
... | [
"__author__ = 'Administrator'",
"from django.shortcuts import render_to_response",
"address = [\n {'name':'张三', 'address':'地址一'},\n {'name':'李四', 'address':'地址二'}\n]",
"def index(request):\n return render_to_response('list.html', {'address': address})",
" return render_to_response('list.html', {... |
# Create your views here.
| [] | [] |
#!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo... | [
[
1,
0,
0.1429,
0.0714,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
1,
0,
0.2143,
0.0714,
0,
0.66,
0.25,
201,
0,
1,
0,
0,
201,
0,
0
],
[
7,
0,
0.4643,
0.4286,
0,
0.... | [
"from django.core.management import execute_manager",
"import imp",
"try:\n imp.find_module('settings') # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized thi... |
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'DjangoDemo.views.home', name='home'),
# url(r'^DjangoDemo/', include('DjangoD... | [
[
1,
0,
0.05,
0.05,
0,
0.66,
0,
341,
0,
3,
0,
0,
341,
0,
0
],
[
1,
0,
0.2,
0.05,
0,
0.66,
0.3333,
302,
0,
1,
0,
0,
302,
0,
0
],
[
8,
0,
0.25,
0.05,
0,
0.66,
0.6... | [
"from django.conf.urls.defaults import patterns, include, url",
"from django.contrib import admin",
"admin.autodiscover()",
"urlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'DjangoDemo.views.home', name='home'),\n # url(r'^DjangoDemo/', include('DjangoDemo.foo.urls')),\n\n # Uncomment the ... |
# Django settings for DjangoDemo project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'orac... | [
[
14,
0,
0.0208,
0.0069,
0,
0.66,
0,
309,
1,
0,
0,
0,
0,
4,
0
],
[
14,
0,
0.0278,
0.0069,
0,
0.66,
0.0435,
7,
2,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0486,
0.0208,
0,
0.6... | [
"DEBUG = True",
"TEMPLATE_DEBUG = DEBUG",
"ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)",
"MANAGERS = ADMINS",
"DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'test', ... |
from django.db import models
# Create your models here.
class wiki(models.Model):
pagename = models.CharField(max_length=20, unique=True)
content = models.TextField()
| [
[
1,
0,
0.1667,
0.1667,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
3,
0,
0.8333,
0.5,
0,
0.66,
1,
910,
0,
0,
0,
0,
996,
0,
2
],
[
14,
1,
0.8333,
0.1667,
1,
0.38,
... | [
"from django.db import models",
"class wiki(models.Model):\n pagename = models.CharField(max_length=20, unique=True)\n content = models.TextField()",
" pagename = models.CharField(max_length=20, unique=True)",
" content = models.TextField()"
] |
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests... | [
[
8,
0,
0.2188,
0.375,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.5,
0.0625,
0,
0.66,
0.5,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.8438,
0.375,
0,
0.66,
1,... | [
"\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\... |
# Create your views here.
#coding=utf8
from wiki.models import wiki
from django.template import loader
from django.template import context
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.shortcuts import render_to_response
def index(request, pagename=""):
if ... | [
[
1,
0,
0.25,
0.0833,
0,
0.66,
0,
400,
0,
1,
0,
0,
400,
0,
0
],
[
1,
0,
0.3333,
0.0833,
0,
0.66,
0.1667,
213,
0,
1,
0,
0,
213,
0,
0
],
[
1,
0,
0.4167,
0.0833,
0,
0.... | [
"from wiki.models import wiki",
"from django.template import loader",
"from django.template import context",
"from django.http import HttpResponse",
"from django.http import HttpResponseRedirect",
"from django.shortcuts import render_to_response",
"def index(request, pagename=\"\"):\n if pagename:\n ... |
#!/usr/bin/python
# Copyright 2011 Google, Inc. All Rights Reserved.
# simple script to walk source tree looking for third-party licenses
# dumps resulting html page to stdout
import os, re, mimetypes, sys
# read source directories to scan from command line
SOURCE = sys.argv[1:]
# regex to find /* */ style commen... | [
[
1,
0,
0.0816,
0.0102,
0,
0.66,
0,
688,
0,
4,
0,
0,
688,
0,
0
],
[
14,
0,
0.1224,
0.0102,
0,
0.66,
0.0714,
792,
6,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1531,
0.0102,
0,
... | [
"import os, re, mimetypes, sys",
"SOURCE = sys.argv[1:]",
"COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)",
"COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)",
"COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)",
"EXCLUDE_TYPES = [\n \"application/xml\... |
# Set up the system so that this development
# version of google-api-python-client is run, even if
# an older version is installed on the system.
#
# To make this totally automatic add the following to
# your ~/.bash_profile:
#
# export PYTHONPATH=/path/to/where/you/checked/out/apiclient
import sys
import os
sys.path.... | [
[
1,
0,
0.75,
0.0833,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.8333,
0.0833,
0,
0.66,
0.5,
688,
0,
1,
0,
0,
688,
0,
0
],
[
8,
0,
1,
0.0833,
0,
0.66,
... | [
"import sys",
"import os",
"sys.path.insert(0, os.path.dirname(__file__))"
] |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2833,
0.0833,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3333,
0.0167,
0,
0.66,
0.1111,
182,
0,
1,
0,
0,
182,
0,
0
],
[
14,
0,
0.3833,
0.05,
0,
0.66,... | [
"\"\"\"Setup script for oauth2client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"",
"from setuptools import setup",
"packages = [\n 'oauth2client',\n]",
"install_requires = [\n 'httplib2>=0.7.4',\n 'python-gflags',\n ]",
"try:... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 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
#
# Unless ... | [
[
1,
0,
0.0738,
0.0041,
0,
0.66,
0,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.0779,
0.0041,
0,
0.66,
0.0625,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.082,
0.0041,
0,
0... | [
"import base64",
"import hashlib",
"import logging",
"import time",
"from OpenSSL import crypto",
"from anyjson import simplejson",
"CLOCK_SKEW_SECS = 300 # 5 minutes in seconds",
"AUTH_TOKEN_LIFETIME_SECS = 300 # 5 minutes in seconds",
"MAX_TOKEN_LIFETIME_SECS = 86400 # 1 day in seconds",
"cla... |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.5312,
0.1562,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.6562,
0.0312,
0,
0.66,
0.5,
777,
1,
0,
0,
0,
0,
3,
0
],
[
7,
0,
0.875,
0.2812,
0,
0.66,
... | [
"\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"try: # pragma: no cover\n # Should work for Python2.6 and higher.\n import json as simplejson\nexcept ImportError: #... |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.0157,
0.0038,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.019,
0.0009,
0,
0.66,
0.0256,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0209,
0.0009,
0,
0.66,
... | [
"\"\"\"An OAuth 2.0 client.\n\nTools for interacting with OAuth 2.0 protected resources.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import base64",
"import clientsecrets",
"import copy",
"import datetime",
"import httplib2",
"import logging",
"import os",
"import sys",
"im... |
# Copyright (C) 2011 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1619,
0.0476,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2,
0.0095,
0,
0.66,
0.0909,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2286,
0.0095,
0,
0.66,
... | [
"\"\"\"Utilities for reading OAuth 2.0 client secret files.\n\nA client_secrets.json file contains all the information needed to interact with\nan OAuth 2.0 protected service.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from anyjson import simplejson",
"TYPE_WEB = 'web'",
"TYPE_INSTALL... |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1604,
0.0472,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1981,
0.0094,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.217,
0.0094,
0,
0.66,
... | [
"\"\"\"Utilities for OAuth.\n\nUtilities for making it easier to work with OAuth 2.0\ncredentials.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import os",
"import stat",
"import threading",
"from anyjson import simplejson",
"from client import Storage as BaseStorage",
"from clien... |
__version__ = "1.0b9"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0b9\""
] |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1417,
0.0417,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.175,
0.0083,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1917,
0.0083,
0,
0.66,
... | [
"\"\"\"OAuth 2.0 utilities for Django.\n\nUtilities for using OAuth 2.0 in conjunction with\nthe Django datastore.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import oauth2client",
"import base64",
"import pickle",
"from django.db import models",
"from oauth2client.client import St... |
# Copyright (C) 2007 Joe Gregorio
#
# Licensed under the MIT License
"""MIME-Type Parser
This module provides basic functions for handling mime-types. It can handle
matching mime-types against a list of media-ranges. See section 14.1 of the
HTTP specification [RFC 2616] for a complete explanation.
http://www.w3.o... | [
[
8,
0,
0.0814,
0.1105,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1453,
0.0058,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
14,
0,
0.1512,
0.0058,
0,
0.66... | [
"\"\"\"MIME-Type Parser\n\nThis module provides basic functions for handling mime-types. It can handle\nmatching mime-types against a list of media-ranges. See section 14.1 of the\nHTTP specification [RFC 2616] for a complete explanation.\n\n http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1",
"__v... |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.1205,
0.1452,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2046,
0.0033,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2112,
0.0033,
0,
0.66,
... | [
"\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
... |
__version__ = "1.0b9"
| [
[
14,
0,
1,
1,
0,
0.66,
0,
162,
1,
0,
0,
0,
0,
3,
0
]
] | [
"__version__ = \"1.0b9\""
] |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 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
#
# Unless required by applicable l... | [
[
8,
0,
0.0546,
0.0191,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0683,
0.0027,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.0738,
0.0027,
0,
0.66,... | [
"\"\"\"Model objects for requests and responses.\n\nEach API may support one or more serializations, such\nas JSON, Atom, etc. The model classes are responsible\nfor converting between the wire format and the Python\nobject representation.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import... |
#!/usr/bin/python2.4
#
# Copyright (C) 2010 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
#
# Unless required by applicable l... | [
[
8,
0,
0.1545,
0.0407,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.187,
0.0081,
0,
0.66,
0.0769,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2114,
0.0081,
0,
0.66,
... | [
"\"\"\"Errors for the library.\n\nAll exceptions defined by the library\nshould be defined in this file.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from oauth2client.anyjson import simplejson",
"class Error(Exception):\n \"\"\"Base error for this module.\"\"\"\n pass",
" \"\"\"Base... |
#!/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
#
# Unless required by applicable law o... | [
[
8,
0,
0.1818,
0.0636,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2273,
0.0091,
0,
0.66,
0.0476,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2545,
0.0091,
0,
0.66,... | [
"\"\"\"Starting template for Google App Engine applications.\n\nUse this project as a starting point if you are just beginning to build a Google\nApp Engine project. Remember to download the OAuth 2.0 client secrets which can\nbe obtained from the Developer Console <https://code.google.com/apis/console/>\nand save ... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.1272,
0.0592,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1657,
0.0059,
0,
0.66,
0.0667,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1775,
0.0059,
0,
0.66,... | [
"\"\"\"Sample for the Group Settings API demonstrates get and update method.\n\nUsage:\n $ python groupsettings.py\n\nYou can also get help on all the command-line flags the program understands\nby running:",
"__author__ = 'Shraddha Gupta <shraddhag@google.com>'",
"from optparse import OptionParser",
"import... |
# Copyright (C) 2011 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
#
# Unless required by applicable law or agreed to in writi... | [
[
1,
0,
0.2632,
0.0175,
0,
0.66,
0,
813,
0,
1,
0,
0,
813,
0,
0
],
[
8,
0,
0.2807,
0.0175,
0,
0.66,
0.0769,
876,
3,
2,
0,
0,
0,
0,
1
],
[
1,
0,
0.2982,
0.0175,
0,
0.... | [
"from google.appengine.dist import use_library",
"use_library('django', '1.2')",
"from google.appengine.ext import webapp",
"from google.appengine.ext.webapp import template",
"from google.appengine.ext.webapp.util import run_wsgi_app",
"from apiclient.discovery import build",
"import httplib2",
"from... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Basic query against the public shopping search API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
"""Get ... | [
[
8,
0,
0.1875,
0.0312,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.25,
0.0312,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.3125,
0.0312,
0,
0.66,
... | [
"\"\"\"Basic query against the public shopping search API\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a feed of all public products available in the\n Unit... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Queries with paginated results against the shopping search API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main(... | [
[
8,
0,
0.1277,
0.0213,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1702,
0.0213,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.2128,
0.0213,
0,
0.66... | [
"\"\"\"Queries with paginated results against the shopping search API\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a the entire paginated feed of public prod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Query with ranked results against the shopping search API"""
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
"""Get and prin... | [
[
8,
0,
0.1111,
0.0185,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1481,
0.0185,
0,
0.66,
0.25,
78,
0,
1,
0,
0,
78,
0,
0
],
[
14,
0,
0.2037,
0.0185,
0,
0.66,
... | [
"\"\"\"Query with ranked results against the shopping search API\"\"\"",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a histogram of the top 15 brand distribution for a search\n query... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Query with ranked results against the shopping search API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
... | [
[
8,
0,
0.1304,
0.0217,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1739,
0.0217,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.2174,
0.0217,
0,
0.66... | [
"\"\"\"Query with ranked results against the shopping search API\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a feed of public products in the United States ... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Query that is restricted by a parameter against the public shopping search
API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfI... | [
[
8,
0,
0.1477,
0.0455,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2045,
0.0227,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.25,
0.0227,
0,
0.66,
... | [
"\"\"\"Query that is restricted by a parameter against the public shopping search\nAPI\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a feed of all public prod... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Query with grouping against the shopping search API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
"""Get... | [
[
8,
0,
0.125,
0.0208,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1667,
0.0208,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.2083,
0.0208,
0,
0.66,... | [
"\"\"\"Query with grouping against the shopping search API\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a feed of public products in the United States mathin... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Full text search query against the shopping search API"""
import pprint
from apiclient.discovery import build
SHOPPING_API_VERSION = 'v1'
DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'
def main():
"""... | [
[
8,
0,
0.15,
0.025,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2,
0.025,
0,
0.66,
0.1667,
276,
0,
1,
0,
0,
276,
0,
0
],
[
1,
0,
0.25,
0.025,
0,
0.66,
0.33... | [
"\"\"\"Full text search query against the shopping search API\"\"\"",
"import pprint",
"from apiclient.discovery import build",
"SHOPPING_API_VERSION = 'v1'",
"DEVELOPER_KEY = 'AIzaSyACZJW4JwcWwz5taR2gjIMNQrtgDLfILPc'",
"def main():\n \"\"\"Get and print a feed of all public products matching the search ... |
# Django settings for django_sample project.
import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'database.sqlite3'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
# Lo... | [
[
1,
0,
0.0238,
0.0119,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
14,
0,
0.0476,
0.0119,
0,
0.66,
0.0435,
309,
1,
0,
0,
0,
0,
4,
0
],
[
14,
0,
0.0595,
0.0119,
0,
... | [
"import os",
"DEBUG = True",
"TEMPLATE_DEBUG = DEBUG",
"ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)",
"MANAGERS = ADMINS",
"DATABASE_ENGINE = 'sqlite3'",
"DATABASE_NAME = 'database.sqlite3'",
"DATABASE_USER = ''",
"DATABASE_PASSWORD = ''",
"DATABASE_HOST = ''",
"DATABASE_PORT = ... |
import os
from django.conf.urls.defaults import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Example:
(r'^$', 'django_sample.plus.views.index'),
(r'^oauth2callback', 'django_sample.plus.views.auth_return'),
# ... | [
[
1,
0,
0.04,
0.04,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.08,
0.04,
0,
0.66,
0.25,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.2,
0.04,
0,
0.66,
0.5,
... | [
"import os",
"from django.conf.urls.defaults import *",
"from django.contrib import admin",
"admin.autodiscover()",
"urlpatterns = patterns('',\n # Example:\n (r'^$', 'django_sample.plus.views.index'),\n (r'^oauth2callback', 'django_sample.plus.views.auth_return'),\n\n # Uncomment the admin/doc ... |
import pickle
import base64
from django.contrib import admin
from django.contrib.auth.models import User
from django.db import models
from oauth2client.django_orm import FlowField
from oauth2client.django_orm import CredentialsField
# The Flow could also be stored in memcache since it is short lived.
class FlowMod... | [
[
1,
0,
0.0303,
0.0303,
0,
0.66,
0,
848,
0,
1,
0,
0,
848,
0,
0
],
[
1,
0,
0.0606,
0.0303,
0,
0.66,
0.0833,
177,
0,
1,
0,
0,
177,
0,
0
],
[
1,
0,
0.1212,
0.0303,
0,
... | [
"import pickle",
"import base64",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.db import models",
"from oauth2client.django_orm import FlowField",
"from oauth2client.django_orm import CredentialsField",
"class FlowModel(models.Model):\n id = models.F... |
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
""... | [
[
8,
0,
0.1458,
0.25,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3333,
0.0417,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5833,
0.2917,
0,
0.66,
... | [
"\"\"\"\nThis file demonstrates two different styles of tests (one doctest and one\nunittest). These will both pass when you run \"manage.py test\".\n\nReplace these with more appropriate tests for your application.\n\"\"\"",
"from django.test import TestCase",
"class SimpleTest(TestCase):\n\n def test_basic... |
import os
import logging
import httplib2
from django.http import HttpResponse
from django.core.urlresolvers import reverse
from django.contrib.auth.decorators import login_required
from oauth2client.django_orm import Storage
from oauth2client.client import OAuth2WebServerFlow
from django_sample.plus.models import Cre... | [
[
1,
0,
0.0164,
0.0164,
0,
0.66,
0,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.0328,
0.0164,
0,
0.66,
0.0667,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0492,
0.0164,
0,
... | [
"import os",
"import logging",
"import httplib2",
"from django.http import HttpResponse",
"from django.core.urlresolvers import reverse",
"from django.contrib.auth.decorators import login_required",
"from oauth2client.django_orm import Storage",
"from oauth2client.client import OAuth2WebServerFlow",
... |
#!/usr/bin/python
from django.core.management import execute_manager
try:
import settings # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("""Error: Can't find the file 'settings.py' in the
directory containing %r. It appears you've customized things. You'll
have to run... | [
[
1,
0,
0.1333,
0.0667,
0,
0.66,
0,
879,
0,
1,
0,
0,
879,
0,
0
],
[
7,
0,
0.5,
0.6667,
0,
0.66,
0.5,
0,
0,
1,
0,
0,
0,
0,
2
],
[
1,
1,
0.2667,
0.0667,
1,
0.53,
... | [
"from django.core.management import execute_manager",
"try:\n import settings # Assumed to be in the same directory.\nexcept ImportError:\n import sys\n sys.stderr.write(\"\"\"Error: Can't find the file 'settings.py' in the\ndirectory containing %r. It appears you've customized things. You'll\nhave to ru... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright 2010 Google Inc. All Rights Reserved.
"""Simple command-line example for Latitude.
Command-line application that sets the users
current location.
"""
__author__ = 'jcgregorio@google.com (Joe Gregorio)'
from apiclient.discovery import build
import httplib2... | [
[
8,
0,
0.1176,
0.0735,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1765,
0.0147,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2206,
0.0147,
0,
0.66,
... | [
"\"\"\"Simple command-line example for Latitude.\n\nCommand-line application that sets the users\ncurrent location.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"from apiclient.discovery import build",
"import httplib2",
"import pickle",
"from apiclient.discovery import build",
"from... |
#!/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
#
# Unless required by applicable law o... | [
[
8,
0,
0.2629,
0.1856,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3711,
0.0103,
0,
0.66,
0.0556,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3918,
0.0103,
0,
0.66,... | [
"\"\"\"This application produces formatted listings for Google Cloud\n Storage buckets.\n\nIt takes a bucket name in the URL path and does an HTTP GET on the \ncorresponding Google Cloud Storage URL to obtain a listing of the \nbucket contents. For example, if this app is invoked with the URI \nhttp://bucket-list... |
#!/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
#
# Unless required by applicable law o... | [
[
8,
0,
0.2593,
0.1111,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3333,
0.0123,
0,
0.66,
0.0588,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3704,
0.0123,
0,
0.66,... | [
"\"\"\"Starting template for Google App Engine applications.\n\nUse this project as a starting point if you are just beginning to build a\nGoogle App Engine project which will access and manage data held under a role\naccount for the App Engine app. More information about using Google App Engine\napps to call Goog... |
#!/usr/bin/env python
#
# Copyright 2011 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
#
# Unless required by applicable law o... | [
[
8,
0,
0.122,
0.0427,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.1524,
0.0061,
0,
0.66,
0.0455,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1646,
0.0061,
0,
0.66,
... | [
"\"\"\"Sample application for Python documentation of APIs.\n\nThis is running live at http://api-python-client-doc.appspot.com where it\nprovides a list of APIs and PyDoc documentation for all the generated API\nsurfaces as they appear in the google-api-python-client. In addition it also\nprovides a Google Gadget.... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 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
#
# Unless ... | [
[
8,
0,
0.4432,
0.0909,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.5227,
0.0227,
0,
0.66,
0.2,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5682,
0.0227,
0,
0.66,
... | [
"\"\"\"Simple command-line example for Custom Search.\n\nCommand-line application that does a search.\n\"\"\"",
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import pprint",
"from apiclient.discovery import build",
"def main():\n # Build a service object for interacting with the API. Visit\n # t... |
#!/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
#
# Unless required by applicable law o... | [
[
14,
0,
0.1698,
0.0094,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1981,
0.0094,
0,
0.66,
0.05,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.2075,
0.0094,
0,
0.6... | [
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import httplib2",
"import logging",
"import os",
"import pickle",
"from oauth2client.appengine import CredentialsProperty",
"from oauth2client.appengine import StorageByKeyName",
"from oauth2client.client import OAuth2WebServerFlow",
"from goog... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2761,
0.0597,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3284,
0.0149,
0,
0.66,
0.1111,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3582,
0.0149,
0,
0.66,... | [
"\"\"\"This example gets all ad clients for an account.\n\nTags: accounts.adclients.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"MAX_PAGE_SIZE = 50",
"gflags.DEFINE_string('account... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2826,
0.087,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3478,
0.0145,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3768,
0.0145,
0,
0.66,
... | [
"\"\"\"This example gets all URL channels in an ad client.\n\nTo get ad clients, run get_all_ad_clients.py.\n\nTags: urlchannels.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2151,
0.0753,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2688,
0.0108,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.2903,
0.0108,
0,
0.66,... | [
"\"\"\"This example gets all custom channels an ad unit has been added to.\n\nTo get ad clients, run get_all_ad_clients.py. To get ad units, run\nget_all_ad_units.py.\n\nTags: customchannels.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2cl... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.291,
0.0896,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3582,
0.0149,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3881,
0.0149,
0,
0.66,
... | [
"\"\"\"This example gets all ad units in an ad client.\n\nTo get ad clients, run get_all_ad_clients.py.\n\nTags: adunits.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2437,
0.075,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3,
0.0125,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.325,
0.0125,
0,
0.66,
... | [
"\"\"\"This example gets all ad units corresponding to a specified custom channel.\n\nTo get custom channels, run get_all_custom_channels.py.\n\nTags: accounts.customchannels.adunits.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2client.cli... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2826,
0.087,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3478,
0.0145,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3768,
0.0145,
0,
0.66,
... | [
"\"\"\"This example gets a specific account for the logged in user.\n\nThis includes the full tree of sub-accounts.\n\nTags: accounts.get\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sam... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.319,
0.069,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3793,
0.0172,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4138,
0.0172,
0,
0.66,
... | [
"\"\"\"This example gets all ad clients for the logged in user's default account.\n\nTags: adclients.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"MAX_PAGE_SIZE = 50",
"def main(arg... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.3364,
0.0727,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4,
0.0182,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4364,
0.0182,
0,
0.66,
... | [
"\"\"\"This example gets all accounts for the logged in user.\n\nTags: accounts.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"MAX_PAGE_SIZE = 50",
"def main(argv):\n sample_utils.p... |
#!/usr/bin/python
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2468,
0.0759,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3038,
0.0127,
0,
0.66,
0.1,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3291,
0.0127,
0,
0.66,
... | [
"\"\"\"This example gets all custom channels in an ad client.\n\nTo get ad clients, run get_all_ad_clients.py.\n\nTags: customchannels.list\n\"\"\"",
"__author__ = 'sergio.gomes@google.com (Sergio Gomes)'",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import s... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 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
#
# Unless ... | [
[
8,
0,
0.3538,
0.1692,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4615,
0.0154,
0,
0.66,
0.125,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4923,
0.0154,
0,
0.66,
... | [
"\"\"\"Simple command-line sample that demonstrates service accounts.\n\nLists all the Google Task Lists associated with the given service account.\nService accounts are created in the Google API Console. See the documentation\nfor more information:\n\n https://developers.google.com/console/help/#WhatIsKey",
"_... |
#!/usr/bin/env python
#
# Copyright (C) 2010 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
#
# Unless required by applicable ... | [
[
8,
0,
0.3208,
0.0189,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3585,
0.0189,
0,
0.66,
0.1667,
162,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4151,
0.0189,
0,
0.66,... | [
"\"\"\"Setup script for the Google TaskQueue API command-line tool.\"\"\"",
"__version__ = '1.0.2'",
"import sys",
"try:\n from setuptools import setup\n print('Loaded setuptools')\nexcept ImportError:\n from distutils.core import setup\n print('Loaded distutils.core')",
" from setuptools imp... |
#!/usr/bin/env python
#
# Copyright (C) 2010 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
#
# Unless required by applicable ... | [
[
8,
0,
0.0853,
0.0047,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.0995,
0.0047,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.1185,
0.0047,
0,
0.66,... | [
"\"\"\"Commands to interact with the Task object of the TaskQueue API.\"\"\"",
"__version__ = '0.0.1'",
"from gtaskqueue.taskqueue_cmd_base import GoogleTaskCommand",
"from google.apputils import app",
"from google.apputils import appcommands",
"import gflags as flags",
"FLAGS = flags.FLAGS",
"class G... |
#!/usr/bin/env python
#
# Copyright (C) 2010 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
#
# Unless required by applicable ... | [
[
8,
0,
0.3396,
0.0189,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3774,
0.0189,
0,
0.66,
0.0833,
162,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.434,
0.0189,
0,
0.66,
... | [
"\"\"\"Command line tool for interacting with Google TaskQueue API.\"\"\"",
"__version__ = '0.0.1'",
"import logging",
"from gtaskqueue import task_cmds",
"from gtaskqueue import taskqueue_cmds",
"from google.apputils import appcommands",
"import gflags as flags",
"LOG_LEVELS = [logging.DEBUG,\n ... |
#!/usr/bin/env python
#
# Copyright (C) 2010 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
#
# Unless required by applicable ... | [
[
8,
0,
0.2982,
0.0175,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3509,
0.0175,
0,
0.66,
0.1429,
162,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4211,
0.0175,
0,
0.66,... | [
"\"\"\"Commands to interact with the TaskQueue object of the TaskQueue API.\"\"\"",
"__version__ = '0.0.1'",
"from gtaskqueue.taskqueue_cmd_base import GoogleTaskQueueCommand",
"from google.apputils import appcommands",
"import gflags as flags",
"FLAGS = flags.FLAGS",
"class GetTaskQueueCommand(GoogleTa... |
#!/usr/bin/env python
#
# 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
#
# Unless required by applicable law or agreed to in writing, softwa... | [
[
8,
0,
0.1535,
0.0526,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2105,
0.0088,
0,
0.66,
0.0909,
326,
0,
1,
0,
0,
326,
0,
0
],
[
1,
0,
0.2193,
0.0088,
0,
0.66... | [
"\"\"\"Tool to get an Access Token to access an auth protected Appengine end point.\n\nThis tool talks to the appengine end point, and gets an Access Token that is\nstored in a file. This token can be used by a tool to do authorized access to\nan appengine end point.\n\"\"\"",
"from google.apputils import app",
... |
#!/usr/bin/env python
#
# Copyright (C) 2010 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
#
# Unless required by applicable ... | [
[
8,
0,
0.3148,
0.0185,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3889,
0.0185,
0,
0.66,
0.1111,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.4074,
0.0185,
0,
0.66... | [
"\"\"\"Log settings for taskqueue_puller module.\"\"\"",
"import logging",
"import logging.config",
"from google.apputils import app",
"import gflags as flags",
"FLAGS = flags.FLAGS",
"flags.DEFINE_string(\n 'log_output_file',\n '/tmp/taskqueue-puller.log',\n 'Logfile name for taskq... |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2891,
0.0625,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3438,
0.0156,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.375,
0.0156,
0,
0.66,
... | [
"\"\"\"This example illustrates how to do a sparse update of the account attributes.\n\nTags: accounts.patch\n\"\"\"",
"__author__ = 'david.t@google.com (David Torres)'",
"import pprint",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"... |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2681,
0.058,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.3188,
0.0145,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3478,
0.0145,
0,
0.66,
... | [
"\"\"\"This example illustrates how to retrieve the information of a creative.\n\nTags: creatives.insert\n\"\"\"",
"__author__ = 'david.t@google.com (David Torres)'",
"import pprint",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"gfla... |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.4022,
0.087,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4783,
0.0217,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.5217,
0.0217,
0,
0.66,
... | [
"\"\"\"This example gets all accounts for the logged in user.\n\nTags: accounts.list\n\"\"\"",
"__author__ = 'david.t@google.com (David Torres)'",
"import pprint",
"import sys",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"def main(argv):\n sample_utils.process_fla... |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.3627,
0.0784,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4314,
0.0196,
0,
0.66,
0.1429,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4706,
0.0196,
0,
0.66,... | [
"\"\"\"This example gets the active direct deals associated to the logged in user.\n\nTags: directDeals.list\n\"\"\"",
"__author__ = 'david.t@google.com (David Torres)'",
"import pprint",
"import sys",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"def main(argv):\n ... |
#!/usr/bin/python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# 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
#
# Unless required b... | [
[
8,
0,
0.2372,
0.0513,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.2821,
0.0128,
0,
0.66,
0.0714,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3077,
0.0128,
0,
0.66,... | [
"\"\"\"This example illustrates how to submit a new creative for its verification.\n\nTags: creatives.insert\n\"\"\"",
"__author__ = 'david.t@google.com (David Torres)'",
"import pprint",
"import sys",
"import gflags",
"from oauth2client.client import AccessTokenRefreshError",
"import sample_utils",
"... |
# Copyright (C) 2010 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
#
# Unless required by applicable law or agreed to in writ... | [
[
8,
0,
0.2394,
0.0704,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2817,
0.0141,
0,
0.66,
0.1111,
182,
0,
1,
0,
0,
182,
0,
0
],
[
14,
0,
0.3662,
0.1268,
0,
0.6... | [
"\"\"\"Setup script for Google API Python client.\n\nAlso installs included versions of third party libraries, if those libraries\nare not already installed.\n\"\"\"",
"from setuptools import setup",
"packages = [\n 'apiclient',\n 'oauth2client',\n 'apiclient.ext',\n 'apiclient.contrib',\n 'apiclient.contr... |
# Early, and incomplete implementation of -04.
#
import re
import urllib
RESERVED = ":/?#[]@!$&'()*+,;="
OPERATOR = "+./;?|!@"
EXPLODE = "*+"
MODIFIER = ":^"
TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE)
VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part... | [
[
1,
0,
0.0204,
0.0068,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.0272,
0.0068,
0,
0.66,
0.0833,
614,
0,
1,
0,
0,
614,
0,
0
],
[
14,
0,
0.0408,
0.0068,
0,
... | [
"import re",
"import urllib",
"RESERVED = \":/?#[]@!$&'()*+,;=\"",
"OPERATOR = \"+./;?|!@\"",
"EXPLODE = \"*+\"",
"MODIFIER = \":^\"",
"TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)",
"VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])... |
#!/usr/bin/env python
import glob
import imp
import logging
import os
import sys
import unittest
from trace import fullmodname
logging.basicConfig(level=logging.CRITICAL)
APP_ENGINE_PATH='../google_appengine'
# Conditional import of cleanup function
try:
from tests.utils import cleanup
except:
def cleanup():
... | [
[
1,
0,
0.0541,
0.027,
0,
0.66,
0,
958,
0,
1,
0,
0,
958,
0,
0
],
[
1,
0,
0.0811,
0.027,
0,
0.66,
0.0667,
201,
0,
1,
0,
0,
201,
0,
0
],
[
1,
0,
0.1081,
0.027,
0,
0.6... | [
"import glob",
"import imp",
"import logging",
"import os",
"import sys",
"import unittest",
"from trace import fullmodname",
"logging.basicConfig(level=logging.CRITICAL)",
"APP_ENGINE_PATH='../google_appengine'",
"try:\n from tests.utils import cleanup\nexcept:\n def cleanup():\n pass",
" ... |
#!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 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
#
# Unless ... | [
[
8,
0,
0.3108,
0.1486,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
14,
0,
0.4054,
0.0135,
0,
0.66,
0.0833,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.4324,
0.0135,
0,
0.66,... | [
"\"\"\"Generate command-line samples from stubs.\n\nGenerates a command-line client sample application from a set of files\nthat contain only the relevant portions that change between each API.\nThis allows all the common code to go into a template.\n\nUsage:\n python sample_generator.py",
"__author__ = 'jcgrego... |
#!/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
#
# Unless required by applicable law o... | [
[
14,
0,
0.2698,
0.0159,
0,
0.66,
0,
777,
1,
0,
0,
0,
0,
3,
0
],
[
1,
0,
0.3016,
0.0159,
0,
0.66,
0.0909,
688,
0,
1,
0,
0,
688,
0,
0
],
[
1,
0,
0.3175,
0.0159,
0,
0... | [
"__author__ = 'jcgregorio@google.com (Joe Gregorio)'",
"import os",
"import pydoc",
"import re",
"import sys",
"import httplib2",
"from oauth2client.anyjson import simplejson",
"from apiclient.discovery import build",
"BASE = 'docs/dyn'",
"def document(resource, path):\n print(path)\n collection... |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 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
#
# Unless req... | [
[
8,
0,
0.1048,
0.0568,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1397,
0.0044,
0,
0.66,
0.0556,
273,
0,
1,
0,
0,
273,
0,
0
],
[
1,
0,
0.1441,
0.0044,
0,
0.66... | [
"\"\"\"Build wiki page with a list of all samples.\n\nThe information for the wiki page is built from data found in all the README\nfiles in the samples. The format of the README file is:\n\n\n Description is everything up to the first blank line.",
"import httplib2",
"import itertools",
"import json",
"i... |
#!/usr/bin/python2.6
#
# Simple http server to emulate api.playfoursquare.com
import logging
import shutil
import sys
import urlparse
import SimpleHTTPServer
import BaseHTTPServer
class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
"""Handle playfoursquare.com requests, for testing."""
def do_GET(self... | [
[
1,
0,
0.0588,
0.0118,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0706,
0.0118,
0,
0.66,
0.125,
614,
0,
1,
0,
0,
614,
0,
0
],
[
1,
0,
0.0824,
0.0118,
0,
0... | [
"import logging",
"import shutil",
"import sys",
"import urlparse",
"import SimpleHTTPServer",
"import BaseHTTPServer",
"class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):\n \"\"\"Handle playfoursquare.com requests, for testing.\"\"\"\n\n def do_GET(self):\n logging.warn('do_GET: %s, %s',... |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | [
[
8,
0,
0.0631,
0.0991,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1261,
0.009,
0,
0.66,
0.05,
2,
0,
1,
0,
0,
2,
0,
0
],
[
1,
0,
0.1351,
0.009,
0,
0.66,
0.... | [
"\"\"\"\nPull a oAuth protected page from foursquare.\n\nExpects ~/.oget to contain (one on each line):\nCONSUMER_KEY\nCONSUMER_KEY_SECRET\nUSERNAME\nPASSWORD",
"import httplib",
"import os",
"import re",
"import sys",
"import urllib",
"import urllib2",
"import urlparse",
"import user",
"from xml.... |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | [
[
1,
0,
0.0263,
0.0088,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.0439,
0.0088,
0,
0.66,
0.0833,
290,
0,
1,
0,
0,
290,
0,
0
],
[
1,
0,
0.0526,
0.0088,
0,
... | [
"import logging",
"from xml.dom import minidom",
"from xml.dom import pulldom",
"BOOLEAN = \"boolean\"",
"STRING = \"String\"",
"GROUP = \"Group\"",
"DEFAULT_INTERFACES = ['FoursquareType']",
"INTERFACES = {\n}",
"DEFAULT_CLASS_IMPORTS = [\n]",
"CLASS_IMPORTS = {\n# 'Checkin': DEFAULT_CLASS_IMP... |
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | [
[
1,
0,
0.0201,
0.0067,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0268,
0.0067,
0,
0.66,
0.0769,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0336,
0.0067,
0,
... | [
"import datetime",
"import sys",
"import textwrap",
"import common",
"from xml.dom import pulldom",
"PARSER = \"\"\"\\\n/**\n * Copyright 2009 Joe LaPenna\n */\n\npackage com.joelapenna.foursquare.parsers;\n\nimport com.joelapenna.foursquare.Foursquare;",
"BOOLEAN_STANZA = \"\"\"\\\n } else i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.