code stringlengths 1 1.49M | vector listlengths 0 7.38k | snippet listlengths 0 7.38k |
|---|---|---|
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from pirate_forum.models import ForumDimension
from search.core import search
from oa_cache.models import ListCache
from django.core.validators import URLValidator
from django.core.exceptions import ValidationError
fro... | [
[
1,
0,
0.0017,
0.0017,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0035,
0.0017,
0,
0.66,
0.0233,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0052,
0.0017,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from pirate_forum.models import ForumDimension",
"from search.core import search",
"from oa_cache.models import ListCache",
"from django.core.validators import URLValidator",
"from django.core.e... |
# Create your views here.
| [] | [] |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
#from ModuleDeliberation.models import Comment
from django.utils.translation im... | [
[
1,
0,
0.0057,
0.0057,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0114,
0.0057,
0,
0.66,
0.0417,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.017,
0.0057,
0,
0.6... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.utils.translation import ugettex... |
from django import forms
from django.forms.extras import SelectDateWidget
from pirate_issues.models import Problem, Solution, Policy
from pirate_topics.models import Topic
from pirate_forum.forms import BlobForm
from pirate_core.forms import FormMixin
from pirate_core.widgets import HorizRadioRenderer
from django.contr... | [
[
1,
0,
0.0122,
0.0122,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0244,
0.0122,
0,
0.66,
0.0769,
300,
0,
1,
0,
0,
300,
0,
0
],
[
1,
0,
0.0366,
0.0122,
0,
... | [
"from django import forms",
"from django.forms.extras import SelectDateWidget",
"from pirate_issues.models import Problem, Solution, Policy",
"from pirate_topics.models import Topic",
"from pirate_forum.forms import BlobForm",
"from pirate_core.forms import FormMixin",
"from pirate_core.widgets import H... |
"""
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 that 1 + 1 a... | [
[
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.
| [] | [] |
import search
from search.core import startswith, porter_stemmer
from oa_filmgenome.models import Film, FilmIdea, Scene
search.register(FilmIdea, ('summary','description'), search_index='autocomplete_index',indexer=startswith)
search.register(FilmIdea, ('summary','description'), search_index='search_index',indexer=por... | [
[
1,
0,
0.1429,
0.1429,
0,
0.66,
0,
163,
0,
1,
0,
0,
163,
0,
0
],
[
1,
0,
0.2857,
0.1429,
0,
0.66,
0.25,
216,
0,
2,
0,
0,
216,
0,
0
],
[
1,
0,
0.4286,
0.1429,
0,
0.... | [
"import search",
"from search.core import startswith, porter_stemmer",
"from oa_filmgenome.models import Film, FilmIdea, Scene",
"search.register(FilmIdea, ('summary','description'), search_index='autocomplete_index',indexer=startswith)",
"search.register(FilmIdea, ('summary','description'), search_index='s... |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.contrib.comments.signals import comment_was_posted
from pirate_perm... | [
[
1,
0,
0.012,
0.012,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0241,
0.012,
0,
0.66,
0.0526,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0361,
0.012,
0,
0.66,
... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.contrib.comments.signals import ... |
"""
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 that 1 + 1 a... | [
[
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 import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.contenttypes.models import ContentType
from oa_verification.models import ActionTaken
from pirate_core import HttpRedirectException, namespace_get, FormMixin
from pirate_signals.model... | [
[
1,
0,
0.0024,
0.0024,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0048,
0.0024,
0,
0.66,
0.0303,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0072,
0.0024,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.contenttypes.models import ContentType",
"from oa_verification.models import ActionTaken",
"from pirate_core import HttpRedirectException, namespace_get, For... |
# Create your views here.
| [] | [] |
#!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# 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 a... | [
[
8,
0,
0.1192,
0.0841,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.1682,
0.0047,
0,
0.66,
0.125,
934,
0,
1,
0,
0,
934,
0,
0
],
[
1,
0,
0.1729,
0.0047,
0,
0.66,... | [
"\"\"\"Python client library for the Facebook Platform.\n\nThis client library is designed to support the Graph API and the official\nFacebook JavaScript SDK, which is the canonical way to implement\nFacebook authentication. Read more about the Graph API at\nhttp://developers.facebook.com/docs/api. You can download... |
from django.db import models
from django.contrib.auth.models import User
from django.core.exceptions import SuspiciousOperation
from pirate_reputation.models import ReputationDimension
class PermissionsGroup(models.Model):
name = models.CharField(max_length=70)
description = models.TextField()
#users = m... | [
[
1,
0,
0.0263,
0.0263,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0526,
0.0263,
0,
0.66,
0.1667,
808,
0,
1,
0,
0,
808,
0,
0
],
[
1,
0,
0.0789,
0.0263,
0,
0.... | [
"from django.db import models",
"from django.contrib.auth.models import User",
"from django.core.exceptions import SuspiciousOperation",
"from pirate_reputation.models import ReputationDimension",
"class PermissionsGroup(models.Model):\n name = models.CharField(max_length=70)\n description = models.Te... |
import testlib, pirate_permissions
__test__ = testlib.get_test_dict(pirate_permissions, locals())
| [
[
1,
0,
0.5,
0.25,
0,
0.66,
0,
552,
0,
2,
0,
0,
552,
0,
0
],
[
14,
0,
1,
0.25,
0,
0.66,
1,
761,
3,
2,
0,
0,
805,
10,
2
]
] | [
"import testlib, pirate_permissions",
"__test__ = testlib.get_test_dict(pirate_permissions, locals())"
] |
from django import template
from pirate_permissions import facade
from customtags.decorators import block
@block
def canI(context, nodelist, *args, **kwargs):
user = template.Variable(kwargs['user']).resolve(context)
permission_str = kwargs['permission_str']
component = kwargs['component']
generic_o... | [
[
1,
0,
0.0476,
0.0476,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0952,
0.0476,
0,
0.66,
0.3333,
3,
0,
1,
0,
0,
3,
0,
0
],
[
1,
0,
0.1429,
0.0476,
0,
0.66... | [
"from django import template",
"from pirate_permissions import facade",
"from customtags.decorators import block",
"def canI(context, nodelist, *args, **kwargs):\n\n user = template.Variable(kwargs['user']).resolve(context)\n permission_str = kwargs['permission_str']\n component = kwargs['component']... |
from django import forms
from customtags.decorators import block
from pirate_core.views import namespace_get
from pirate_core.forms import FormMixin
from pirate_permissions.models import PermissionsGroup
get_namespace = namespace_get("pp_permissions")
@block
def pp_permgroup_list(context, nodelist, *args, **kwargs):
... | [
[
1,
0,
0.0204,
0.0204,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0408,
0.0204,
0,
0.66,
0.125,
173,
0,
1,
0,
0,
173,
0,
0
],
[
1,
0,
0.0612,
0.0204,
0,
0... | [
"from django import forms",
"from customtags.decorators import block",
"from pirate_core.views import namespace_get",
"from pirate_core.forms import FormMixin",
"from pirate_permissions.models import PermissionsGroup",
"get_namespace = namespace_get(\"pp_permissions\")",
"def pp_permgroup_list(context, ... |
from pirate_permissions.models import PermissionsGroup, Permission
from pirate_reputation.models import Reputation
def canI(user, permission_str, component, generic_obj=None):
'''
This method is used to test whether a particular has permission to undertake a particular
action within a particular system c... | [
[
1,
0,
0.0198,
0.0099,
0,
0.66,
0,
866,
0,
2,
0,
0,
866,
0,
0
],
[
1,
0,
0.0297,
0.0099,
0,
0.66,
0.5,
503,
0,
1,
0,
0,
503,
0,
0
],
[
2,
0,
0.5248,
0.9406,
0,
0.6... | [
"from pirate_permissions.models import PermissionsGroup, Permission",
"from pirate_reputation.models import Reputation",
"def canI(user, permission_str, component, generic_obj=None):\n '''\n This method is used to test whether a particular has permission to undertake a particular\n action within a part... |
# Create your views here.
| [] | [] |
import datetime
try:
import cPickle as pickle
except ImportError:
import pickle
from django.db import models
from django.db.models.query import QuerySet
from django.conf import settings
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.template import Context
from... | [
[
1,
0,
0.0022,
0.0022,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
7,
0,
0.0097,
0.0086,
0,
0.66,
0.0244,
0,
0,
1,
0,
0,
0,
0,
0
],
[
1,
1,
0.0086,
0.0022,
1,
0.16... | [
"import datetime",
"try:\n import cPickle as pickle\nexcept ImportError:\n import pickle",
" import cPickle as pickle",
" import pickle",
"from django.db import models",
"from django.db.models.query import QuerySet",
"from django.conf import settings",
"from django.core.mail import send_ma... |
"""
lockfile.py - Platform-independent advisory file locks.
Requires Python 2.5 unless you apply 2.4.diff
Locking is done on a per-thread basis instead of a per-process basis.
Usage:
>>> lock = FileLock('somefile')
>>> try:
... lock.acquire()
... except AlreadyLocked:
... print 'somefile', 'is locked alread... | [
[
8,
0,
0.051,
0.096,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.102,
0.002,
0,
0.66,
0.0435,
777,
0,
1,
0,
0,
777,
0,
0
],
[
1,
0,
0.106,
0.002,
0,
0.66,
... | [
"\"\"\"\nlockfile.py - Platform-independent advisory file locks.\n\nRequires Python 2.5 unless you apply 2.4.diff\nLocking is done on a per-thread basis instead of a per-process basis.\n\nUsage:",
"from __future__ import division",
"import sys",
"import socket",
"import os",
"import threading",
"import ... |
from django.conf.urls.defaults import *
from notification.views import notices, mark_all_seen, feed_for_user, single, notice_settings
urlpatterns = patterns('',
url(r'^$', notices, name="notification_notices"),
url(r'^settings/$', notice_settings, name="notification_notice_settings"),
url(r'^(\d+)/$', sin... | [
[
1,
0,
0.0909,
0.0909,
0,
0.66,
0,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.2727,
0.0909,
0,
0.66,
0.5,
229,
0,
5,
0,
0,
229,
0,
0
],
[
14,
0,
0.7273,
0.6364,
0,
0.... | [
"from django.conf.urls.defaults import *",
"from notification.views import notices, mark_all_seen, feed_for_user, single, notice_settings",
"urlpatterns = patterns('',\n url(r'^$', notices, name=\"notification_notices\"),\n url(r'^settings/$', notice_settings, name=\"notification_notice_settings\"),\n ... |
from notification.models import Notice
def notification(request):
if request.user.is_authenticated():
return {
'notice_unseen_count': Notice.objects.unseen_count_for(request.user, on_site=True),
}
else:
return {}
| [
[
1,
0,
0.1111,
0.1111,
0,
0.66,
0,
446,
0,
1,
0,
0,
446,
0,
0
],
[
2,
0,
0.6667,
0.7778,
0,
0.66,
1,
14,
0,
1,
1,
0,
0,
0,
2
],
[
4,
1,
0.7222,
0.6667,
1,
0.97,
... | [
"from notification.models import Notice",
"def notification(request):\n if request.user.is_authenticated():\n return {\n 'notice_unseen_count': Notice.objects.unseen_count_for(request.user, on_site=True),\n }\n else:\n return {}",
" if request.user.is_authenticated():\n ... |
from datetime import datetime
from django.core.urlresolvers import reverse
from django.conf import settings
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.shortcuts import get_object_or_404
from django.template.defaultfilters import linebreaks, escape, striptags
fr... | [
[
1,
0,
0.0128,
0.0128,
0,
0.66,
0,
426,
0,
1,
0,
0,
426,
0,
0
],
[
1,
0,
0.0385,
0.0128,
0,
0.66,
0.0769,
749,
0,
1,
0,
0,
749,
0,
0
],
[
1,
0,
0.0513,
0.0128,
0,
... | [
"from datetime import datetime",
"from django.core.urlresolvers import reverse",
"from django.conf import settings",
"from django.contrib.sites.models import Site",
"from django.contrib.auth.models import User",
"from django.shortcuts import get_object_or_404",
"from django.template.defaultfilters impor... |
from django.utils.translation import ugettext as _
from django.http import HttpResponse
from django.contrib.auth import authenticate, login
from django.conf import settings
def simple_basic_auth_callback(request, user, *args, **kwargs):
"""
Simple callback to automatically login the given user after a successf... | [
[
1,
0,
0.0161,
0.0161,
0,
0.66,
0,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0323,
0.0161,
0,
0.66,
0.2,
779,
0,
1,
0,
0,
779,
0,
0
],
[
1,
0,
0.0484,
0.0161,
0,
0.6... | [
"from django.utils.translation import ugettext as _",
"from django.http import HttpResponse",
"from django.contrib.auth import authenticate, login",
"from django.conf import settings",
"def simple_basic_auth_callback(request, user, *args, **kwargs):\n \"\"\"\n Simple callback to automatically login th... |
import logging
from django.core.management.base import NoArgsCommand
from notification.engine import send_all
class Command(NoArgsCommand):
help = "Emit queued notices."
def handle_noargs(self, **options):
logging.basicConfig(level=logging.DEBUG, format="%(message)s")
logging.info("-" *... | [
[
1,
0,
0.1333,
0.0667,
0,
0.66,
0,
715,
0,
1,
0,
0,
715,
0,
0
],
[
1,
0,
0.2667,
0.0667,
0,
0.66,
0.3333,
931,
0,
1,
0,
0,
931,
0,
0
],
[
1,
0,
0.4,
0.0667,
0,
0.6... | [
"import logging",
"from django.core.management.base import NoArgsCommand",
"from notification.engine import send_all",
"class Command(NoArgsCommand):\n help = \"Emit queued notices.\"\n \n def handle_noargs(self, **options):\n logging.basicConfig(level=logging.DEBUG, format=\"%(message)s\")\n ... |
#
# django-atompub by James Tauber <http://jtauber.com/>
# http://code.google.com/p/django-atompub/
# An implementation of the Atom format and protocol for Django
#
# For instructions on how to use this module to generate Atom feeds,
# see http://code.google.com/p/django-atompub/wiki/UserGuide
#
#
# Copyright (c) 2... | [
[
1,
0,
0.0567,
0.0018,
0,
0.66,
0,
759,
0,
1,
0,
0,
759,
0,
0
],
[
1,
0,
0.0585,
0.0018,
0,
0.66,
0.1,
426,
0,
1,
0,
0,
426,
0,
0
],
[
14,
0,
0.064,
0.0018,
0,
0.6... | [
"from xml.sax.saxutils import XMLGenerator",
"from datetime import datetime",
"GENERATOR_TEXT = 'django-atompub'",
"GENERATOR_ATTR = {\n 'uri': 'http://code.google.com/p/django-atompub/',\n 'version': 'r33'\n}",
"class SimplerXMLGenerator(XMLGenerator):\n def addQuickElement(self, name, contents=No... |
VERSION = (0, 2, 0, "a", 1) # following PEP 386
DEV_N = 4
def get_version():
version = "%s.%s" % (VERSION[0], VERSION[1])
if VERSION[2]:
version = "%s.%s" % (version, VERSION[2])
if VERSION[3] != "f":
version = "%s%s%s" % (version, VERSION[3], VERSION[4])
if DEV_N:
vers... | [
[
14,
0,
0.0625,
0.0625,
0,
0.66,
0,
557,
0,
0,
0,
0,
0,
8,
0
],
[
14,
0,
0.125,
0.0625,
0,
0.66,
0.3333,
964,
1,
0,
0,
0,
0,
1,
0
],
[
2,
0,
0.5625,
0.5625,
0,
0.6... | [
"VERSION = (0, 2, 0, \"a\", 1) # following PEP 386",
"DEV_N = 4",
"def get_version():\n version = \"%s.%s\" % (VERSION[0], VERSION[1])\n if VERSION[2]:\n version = \"%s.%s\" % (version, VERSION[2])\n if VERSION[3] != \"f\":\n version = \"%s%s%s\" % (version, VERSION[3], VERSION[4])\n ... |
import sys
import time
import logging
import traceback
try:
import cPickle as pickle
except ImportError:
import pickle
from django.conf import settings
from django.core.mail import mail_admins
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from lockfile import FileL... | [
[
1,
0,
0.0256,
0.0128,
0,
0.66,
0,
509,
0,
1,
0,
0,
509,
0,
0
],
[
1,
0,
0.0385,
0.0128,
0,
0.66,
0.0769,
654,
0,
1,
0,
0,
654,
0,
0
],
[
1,
0,
0.0513,
0.0128,
0,
... | [
"import sys",
"import time",
"import logging",
"import traceback",
"try:\n import cPickle as pickle\nexcept ImportError:\n import pickle",
" import cPickle as pickle",
" import pickle",
"from django.conf import settings",
"from django.core.mail import mail_admins",
"from django.contrib... |
from django.core.urlresolvers import reverse
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponseRedirect, Http404
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.contrib.syndication.views import feed
fr... | [
[
1,
0,
0.0053,
0.0053,
0,
0.66,
0,
749,
0,
1,
0,
0,
749,
0,
0
],
[
1,
0,
0.0106,
0.0053,
0,
0.66,
0.0667,
852,
0,
2,
0,
0,
852,
0,
0
],
[
1,
0,
0.0159,
0.0053,
0,
... | [
"from django.core.urlresolvers import reverse",
"from django.shortcuts import render_to_response, get_object_or_404",
"from django.http import HttpResponseRedirect, Http404",
"from django.template import RequestContext",
"from django.contrib.auth.decorators import login_required",
"from django.contrib.syn... |
from django.contrib import admin
from notification.models import NoticeType, NoticeSetting, Notice, ObservedItem, NoticeQueueBatch
class NoticeTypeAdmin(admin.ModelAdmin):
list_display = ('label', 'display', 'description', 'default')
class NoticeSettingAdmin(admin.ModelAdmin):
list_display = ('id', 'user', 'n... | [
[
1,
0,
0.0588,
0.0588,
0,
0.66,
0,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.1176,
0.0588,
0,
0.66,
0.1111,
446,
0,
5,
0,
0,
446,
0,
0
],
[
3,
0,
0.2647,
0.1176,
0,
... | [
"from django.contrib import admin",
"from notification.models import NoticeType, NoticeSetting, Notice, ObservedItem, NoticeQueueBatch",
"class NoticeTypeAdmin(admin.ModelAdmin):\n list_display = ('label', 'display', 'description', 'default')",
" list_display = ('label', 'display', 'description', 'defau... |
from django.db import models
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from tagging.models import Tag
from django.utils.translation import ugettext as _
from pirate_forum.models ... | [
[
1,
0,
0.0081,
0.0081,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0163,
0.0081,
0,
0.66,
0.0417,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.0244,
0.0081,
0,
0.... | [
"from django.db import models",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from tagging.models import Tag",
"from django.utils.translation import uget... |
from django import forms
from django.forms.extras import SelectDateWidget
from pirate_deliberation.models import Argument, Stance
from pirate_topics.models import Topic
from pirate_forum.forms import BlobForm
from pirate_core.forms import FormMixin
from pirate_core.widgets import HorizRadioRenderer
from django.contrib.... | [
[
1,
0,
0.0169,
0.0169,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0339,
0.0169,
0,
0.66,
0.0909,
300,
0,
1,
0,
0,
300,
0,
0
],
[
1,
0,
0.0508,
0.0169,
0,
... | [
"from django import forms",
"from django.forms.extras import SelectDateWidget",
"from pirate_deliberation.models import Argument, Stance",
"from pirate_topics.models import Topic",
"from pirate_forum.forms import BlobForm",
"from pirate_core.forms import FormMixin",
"from pirate_core.widgets import Hori... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.contenttypes.models import ContentType
from pirate_deliberation.models import Argument, Stance, get_argument_list
from pirate_consensus.models import Consensus, UpDownVote
from pirate_re... | [
[
1,
0,
0.0061,
0.0061,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0121,
0.0061,
0,
0.66,
0.05,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0182,
0.0061,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_deliberation.models import Argument, Stance, get_argument_list",
"from pirate_consensus.models import C... |
ARG_TYPES_DICT = {'y':'yea','n':'nay'}
| [
[
14,
0,
1,
1,
0,
0.66,
0,
649,
0,
0,
0,
0,
0,
6,
0
]
] | [
"ARG_TYPES_DICT = {'y':'yea','n':'nay'}"
] |
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
import datetime
import django.dispatch
from django.contrib import admin
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from pirate_signa... | [
[
1,
0,
0.0227,
0.0227,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0455,
0.0227,
0,
0.66,
0.0833,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0682,
0.0227,
0,
0.... | [
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"import datetime",
"import django.dispatch",
"from django.contrib import admin",
"from django.utils.translation import ugettext as _",
"from django.contrib.a... |
from django import forms
FLAG_CHOICES = (
('Ad Hominem','Ad Hominem'),
('Straw Man','Straw Man'),
('False Dilemma','False Dilemma'),
('Appeal to Authority','Appeal to Authority'),
('Bandwagon','Bandwagon'),
('Cherry Picking','Cherry Picking'),
('Slippery Slope','Slippery Slope'),
('Red ... | [
[
1,
0,
0.0625,
0.0625,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
14,
0,
0.4688,
0.625,
0,
0.66,
0.5,
8,
0,
0,
0,
0,
0,
8,
0
],
[
3,
0,
0.9375,
0.1875,
0,
0.66,
... | [
"from django import forms",
"FLAG_CHOICES = (\n ('Ad Hominem','Ad Hominem'),\n ('Straw Man','Straw Man'),\n ('False Dilemma','False Dilemma'),\n ('Appeal to Authority','Appeal to Authority'),\n ('Bandwagon','Bandwagon'),\n ('Cherry Picking','Cherry Picking'),\n ('Slippery Slope','Slippery Slo... |
"""
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 that 1 + 1 a... | [
[
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 pirate_flags.forms import FlagForm
from pirate_flags.models import Flag,UserFlag
from django import template
from django import forms
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from pirate_consensus.models import Consensus
from django.shortcuts import get_object... | [
[
1,
0,
0.0086,
0.0086,
0,
0.66,
0,
673,
0,
1,
0,
0,
673,
0,
0
],
[
1,
0,
0.0172,
0.0086,
0,
0.66,
0.0588,
602,
0,
2,
0,
0,
602,
0,
0
],
[
1,
0,
0.0259,
0.0086,
0,
... | [
"from pirate_flags.forms import FlagForm",
"from pirate_flags.models import Flag,UserFlag",
"from django import template",
"from django import forms",
"from django.http import HttpResponse, HttpResponseRedirect",
"from django.utils import simplejson",
"from pirate_consensus.models import Consensus",
"... |
# Create your views here.
| [] | [] |
"""Integrates django-notification into the OpenAssembly system.
pirate_messages.models.create_notification users signals to create
flexible notifications from django-notifications
"""
from django.db.models import signals
from django.conf import settings
from django.utils.translation import ugettext_noop as _
... | [
[
8,
0,
0.1,
0.16,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2,
0.04,
0,
0.66,
0.25,
680,
0,
1,
0,
0,
680,
0,
0
],
[
1,
0,
0.24,
0.04,
0,
0.66,
0.5,
1... | [
"\"\"\"Integrates django-notification into the OpenAssembly system.\n pirate_messages.models.create_notification users signals to create \n flexible notifications from django-notifications\n\"\"\"",
"from django.db.models import signals",
"from django.conf import settings",
"from django.utils.translatio... |
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
import datetime
import django.dispatch
from django.contrib import admin
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from pirate_profi... | [
[
1,
0,
0.0072,
0.0072,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0145,
0.0072,
0,
0.66,
0.0556,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0217,
0.0072,
0,
0.... | [
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"import datetime",
"import django.dispatch",
"from django.contrib import admin",
"from django.utils.translation import ugettext as _",
"from django.contrib.a... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from pirate_messages.models import Notification, Message
from django.db import transaction
from django.middleware import csrf
from django.contrib.contenttypes.models import... | [
[
1,
0,
0.0072,
0.0072,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0145,
0.0072,
0,
0.66,
0.0435,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0217,
0.0072,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponse, HttpResponseRedirect",
"from django.utils import simplejson",
"from pirate_messages.models import Notification, Message",
"from django.db import transaction",
"from django.middleware import csrf",
"from d... |
from django import template
from django import forms
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from pirate_messages.models import Message, MessageForm, Notification
from django.db import transaction
from django.middleware import csrf
from django.contrib.contenttypes.... | [
[
1,
0,
0.0094,
0.0094,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0189,
0.0094,
0,
0.66,
0.05,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0283,
0.0094,
0,
0.... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponse, HttpResponseRedirect",
"from django.utils import simplejson",
"from pirate_messages.models import Message, MessageForm, Notification",
"from django.db import transaction",
"from django.middleware import csr... |
# Create your views here.
| [] | [] |
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
import datetime
import django.dispatch
from django.contrib import admin
from django.utils.translation import ugettext as _
from django.contrib.auth.models import User
from pirate_signa... | [
[
1,
0,
0.0031,
0.0031,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0061,
0.0031,
0,
0.66,
0.04,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0092,
0.0031,
0,
0.66... | [
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"import datetime",
"import django.dispatch",
"from django.contrib import admin",
"from django.utils.translation import ugettext as _",
"from django.contrib.a... |
"""
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.1667,
0.2857,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3333,
0.0476,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5476,
0.2857,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from django.shortcuts import get_object_or_404
from django.contrib.contenttypes.models import ContentType
from pirate_core.views import HttpRedirectException, namespace_g... | [
[
1,
0,
0.0029,
0.0029,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0058,
0.0029,
0,
0.66,
0.0357,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0087,
0.0029,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponse, HttpResponseRedirect",
"from django.utils import simplejson",
"from django.shortcuts import get_object_or_404",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core.views import H... |
# Create your views here.
| [] | [] |
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.auth.models import User
from djangotoolbox.fields import ListField
from django.utils.translation import ugettext as _
from django.contrib import admin
from pirate_signals.models import update_agent
from google.ap... | [
[
1,
0,
0.0164,
0.0164,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0328,
0.0164,
0,
0.66,
0.0625,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0492,
0.0164,
0,
0.... | [
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.auth.models import User",
"from djangotoolbox.fields import ListField",
"from django.utils.translation import ugettext as _",
"from django.contrib import admin",
"from pirate_signals.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 that 1 + 1 a... | [
[
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 import template
from oa_platform.models import Platform, PlatformDimension
from pirate_core import namespace_get
from django.contrib.contenttypes.models import ContentType
from pirate_consensus.models import Consensus
from customtags.decorators import block_decorator
register = template.Library()
block = ... | [
[
1,
0,
0.0149,
0.0149,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0299,
0.0149,
0,
0.66,
0.0909,
564,
0,
2,
0,
0,
564,
0,
0
],
[
1,
0,
0.0448,
0.0149,
0,
... | [
"from django import template",
"from oa_platform.models import Platform, PlatformDimension",
"from pirate_core import namespace_get",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_consensus.models import Consensus",
"from customtags.decorators import block_decorator",
"regis... |
# Create your views here.
| [] | [] |
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 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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
# AUTOLOAD_SITECONF module
| [] | [] |
import os, sys, pdb, imp, re, inspect
from django.contrib.admin import site
from django.template import add_to_builtins
def get_module_list(start):
all_files = os.walk(start)
file_list = [(i[0], (i[1], i[2])) for i in all_files]
file_dict = dict(file_list)
curr = start
modules = []
pathlist =... | [
[
1,
0,
0.0099,
0.0099,
0,
0.66,
0,
688,
0,
6,
0,
0,
688,
0,
0
],
[
1,
0,
0.0198,
0.0099,
0,
0.66,
0.1111,
703,
0,
1,
0,
0,
703,
0,
0
],
[
1,
0,
0.0297,
0.0099,
0,
... | [
"import os, sys, pdb, imp, re, inspect",
"from django.contrib.admin import site",
"from django.template import add_to_builtins",
"def get_module_list(start):\n all_files = os.walk(start)\n file_list = [(i[0], (i[1], i[2])) for i in all_files]\n file_dict = dict(file_list)\n\n curr = start\n mod... |
import django.dispatch
aso_rep_change = django.dispatch.Signal(providing_args=["event_score", "user"])
aso_rep_event = django.dispatch.Signal(providing_args=["event_score", "user"])
aso_rep_delete = django.dispatch.Signal(providing_args=["event_score", "user"])
notification_send = django.dispatch.Signal(providing_args... | [
[
1,
0,
0.1,
0.1,
0,
0.66,
0,
548,
0,
1,
0,
0,
548,
0,
0
],
[
14,
0,
0.3,
0.1,
0,
0.66,
0.125,
317,
3,
1,
0,
0,
592,
10,
1
],
[
14,
0,
0.4,
0.1,
0,
0.66,
0.25,
... | [
"import django.dispatch",
"aso_rep_change = django.dispatch.Signal(providing_args=[\"event_score\", \"user\"])",
"aso_rep_event = django.dispatch.Signal(providing_args=[\"event_score\", \"user\"])",
"aso_rep_delete = django.dispatch.Signal(providing_args=[\"event_score\", \"user\"])",
"notification_send = d... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
# Create your views here.
| [] | [] |
from django.db import models
from django.contrib import admin
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django import forms
###TODO: Need to make Source... | [
[
1,
0,
0.0161,
0.0161,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0323,
0.0161,
0,
0.66,
0.0769,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.0484,
0.0161,
0,
0.... | [
"from django.db import models",
"from django.contrib import admin",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.contrib.auth.models import User",
"from django.utils.translation import ugettext as _",
"from django import fo... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
import search
search.autodiscover()
| [
[
1,
0,
0.5,
0.5,
0,
0.66,
0,
163,
0,
1,
0,
0,
163,
0,
0
],
[
8,
0,
1,
0.5,
0,
0.66,
1,
798,
3,
0,
0,
0,
0,
0,
1
]
] | [
"import search",
"search.autodiscover()"
] |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
#from ModuleDeliberation.models import Comment
from django.utils.translation i... | [
[
1,
0,
0.0149,
0.0149,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0299,
0.0149,
0,
0.66,
0.1,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0448,
0.0149,
0,
0.66,... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.utils.translation import ugettex... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponse, HttpResponseRedirect
from django.utils import simplejson
from pirate_comments.models import Comment
from django.db import transaction
from django.middleware import csrf
from django.contrib.contenttypes.models import ContentType
f... | [
[
1,
0,
0.0029,
0.0029,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0057,
0.0029,
0,
0.66,
0.0303,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0086,
0.0029,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponse, HttpResponseRedirect",
"from django.utils import simplejson",
"from pirate_comments.models import Comment",
"from django.db import transaction",
"from django.middleware import csrf",
"from django.contrib.... |
# Create your views here.
| [] | [] |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.utils.translation import ugettext as _
from django.contrib.contenttypes.models import ContentType
# First, define the Manager subclass.
class TopicManager(models.Manager):
... | [
[
1,
0,
0.0227,
0.0227,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0455,
0.0227,
0,
0.66,
0.1111,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0682,
0.0227,
0,
0.... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.utils.translation import ugettext as _",
"from django.contrib.contenttypes.models import ContentType",
"class TopicManager(models.Manager):\n ... |
from django import forms
from pirate_core.forms import FormMixin
from pirate_core.widgets import HorizRadioRenderer
from pirate_topics.models import Topic
class TopicForm(forms.Form, FormMixin):
def save(self, commit=True):
return None
parent = forms.ModelChoiceField(queryset=Topic.clean_objects.... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.1667,
0.0833,
0,
0.66,
0.25,
304,
0,
1,
0,
0,
304,
0,
0
],
[
1,
0,
0.25,
0.0833,
0,
0.66... | [
"from django import forms",
"from pirate_core.forms import FormMixin",
"from pirate_core.widgets import HorizRadioRenderer",
"from pirate_topics.models import Topic",
"class TopicForm(forms.Form, FormMixin):\n \n def save(self, commit=True):\n return None\n\n parent = forms.ModelChoiceField(... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from pirate_forum.templatetags.blobtags import get_form
from pirate_forum.models import ForumDimension
from pirate_consensus.models import Consensus
from pirate_topics.models import Topic
from pirate_core.views import Htt... | [
[
1,
0,
0.0047,
0.0047,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0094,
0.0047,
0,
0.66,
0.0625,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0141,
0.0047,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from pirate_forum.templatetags.blobtags import get_form",
"from pirate_forum.models import ForumDimension",
"from pirate_consensus.models import Consensus",
"from pirate_topics.models import Topic... |
# Create your views here.
| [] | [] |
from django.contrib import admin
from django.db import models
from django.contrib.contenttypes.models import ContentType
from django.contrib.comments.signals import comment_was_posted
from pirate_issues.callbacks import update_issue_comment_count
#from ModuleDeliberation.models import Comment
from django.utils.translat... | [
[
1,
0,
0.0033,
0.0033,
0,
0.66,
0,
302,
0,
1,
0,
0,
302,
0,
0
],
[
1,
0,
0.0066,
0.0033,
0,
0.66,
0.0323,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0099,
0.0033,
0,
0.... | [
"from django.contrib import admin",
"from django.db import models",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.comments.signals import comment_was_posted",
"from pirate_issues.callbacks import update_issue_comment_count",
"from django.utils.translation import ugette... |
from django import forms
from django.forms.extras import SelectDateWidget
from pirate_issues.models import Problem, Solution, Policy
from pirate_topics.models import Topic
from pirate_forum.forms import BlobForm
from pirate_core.forms import FormMixin
from pirate_core.widgets import HorizRadioRenderer
from django.contr... | [
[
1,
0,
0.0116,
0.0116,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0233,
0.0116,
0,
0.66,
0.0833,
300,
0,
1,
0,
0,
300,
0,
0
],
[
1,
0,
0.0349,
0.0116,
0,
... | [
"from django import forms",
"from django.forms.extras import SelectDateWidget",
"from pirate_issues.models import Problem, Solution, Policy",
"from pirate_topics.models import Topic",
"from pirate_forum.forms import BlobForm",
"from pirate_core.forms import FormMixin",
"from pirate_core.widgets import H... |
import testlib, pirate_issues
__test__ = testlib.get_test_dict(pirate_issues, locals())
| [
[
1,
0,
0.5,
0.25,
0,
0.66,
0,
552,
0,
2,
0,
0,
552,
0,
0
],
[
14,
0,
1,
0.25,
0,
0.66,
1,
761,
3,
2,
0,
0,
805,
10,
2
]
] | [
"import testlib, pirate_issues",
"__test__ = testlib.get_test_dict(pirate_issues, locals())"
] |
from pirate_signals.models import aso_rep_event
from pirate_reputation.models import ReputationDimension
#Updates the issue.comments for each comment being posted
def update_issue_comment_count(sender, comment, request, **kwargs):
aso_rep_event.send(sender = sender,event_score=1, user=comment.user, dimension=Reput... | [
[
1,
0,
0.1429,
0.1429,
0,
0.66,
0,
656,
0,
1,
0,
0,
656,
0,
0
],
[
1,
0,
0.2857,
0.1429,
0,
0.66,
0.5,
503,
0,
1,
0,
0,
503,
0,
0
],
[
2,
0,
0.7857,
0.2857,
0,
0.6... | [
"from pirate_signals.models import aso_rep_event",
"from pirate_reputation.models import ReputationDimension",
"def update_issue_comment_count(sender, comment, request, **kwargs):\n aso_rep_event.send(sender = sender,event_score=1, user=comment.user, dimension=ReputationDimension.objects.get('add_comment'))"... |
from django.conf.urls.defaults import *
from pirate_issues import views
urlpatterns = patterns('',
url(r'topics/', views.get_all_topics, name="topic_list"),
url(r'topic/(?P<topic>\d+)/$', views.get_topic, name="get_topic"),
# url(r'upvote/(?P<topic>\d+)/(?P<issue_id>\d+)/$', views.upvote, name="upvote"),
... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
341,
0,
1,
0,
0,
341,
0,
0
],
[
1,
0,
0.1667,
0.0833,
0,
0.66,
0.5,
706,
0,
1,
0,
0,
706,
0,
0
],
[
14,
0,
0.6667,
0.75,
0,
0.66... | [
"from django.conf.urls.defaults import *",
"from pirate_issues import views",
"urlpatterns = patterns('',\n url(r'topics/', views.get_all_topics, name=\"topic_list\"),\n url(r'topic/(?P<topic>\\d+)/$', views.get_topic, name=\"get_topic\"),\n # url(r'upvote/(?P<topic>\\d+)/(?P<issue_id>\\d+)/$', views.up... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace... | [
[
1,
0,
0.0027,
0.0027,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0054,
0.0027,
0,
0.66,
0.0417,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0081,
0.0027,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from django.shortcuts import get_object_or_404",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace... | [
[
1,
0,
0.0028,
0.0028,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0057,
0.0028,
0,
0.66,
0.0435,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0085,
0.0028,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from django.shortcuts import get_object_or_404",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
from django.shortcuts import get_object_or_404
import datetime
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from pirate_core import HttpRedirectException, namespace... | [
[
1,
0,
0.0044,
0.0044,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0088,
0.0044,
0,
0.66,
0.0435,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0132,
0.0044,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"from django.shortcuts import get_object_or_404",
"import datetime",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from pirate_core... |
import search
from search.core import startswith, porter_stemmer
from models import Problem, Solution, Policy
search.register(Problem, ('summary','description'), search_index='autocomplete_index',indexer=startswith)
search.register(Problem, ('summary','description'), search_index='search_index',indexer=porter_stemmer)... | [
[
1,
0,
0.0833,
0.0833,
0,
0.66,
0,
163,
0,
1,
0,
0,
163,
0,
0
],
[
1,
0,
0.1667,
0.0833,
0,
0.66,
0.125,
216,
0,
2,
0,
0,
216,
0,
0
],
[
1,
0,
0.25,
0.0833,
0,
0.6... | [
"import search",
"from search.core import startswith, porter_stemmer",
"from models import Problem, Solution, Policy",
"search.register(Problem, ('summary','description'), search_index='autocomplete_index',indexer=startswith)",
"search.register(Problem, ('summary','description'), search_index='search_index'... |
from django.db import models
from django import template
from django.contrib import admin
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
#from ModuleDeliberation.models import Comment
from django.utils.translation im... | [
[
1,
0,
0.0047,
0.0047,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
1,
0,
0.0093,
0.0047,
0,
0.66,
0.0385,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.014,
0.0047,
0,
0.6... | [
"from django.db import models",
"from django import template",
"from django.contrib import admin",
"from django.contrib.auth.models import User",
"from django.contrib.contenttypes.models import ContentType",
"from django.contrib.contenttypes import generic",
"from django.utils.translation import ugettex... |
from django import forms
from pirate_actions.models import Action
from pirate_topics.models import Topic
from pirate_core.forms import FormMixin
from markitup.widgets import MarkItUpWidget
from pirate_core.widgets import SelectTimeWidget, HorizRadioRenderer
from django.forms.extras import SelectDateWidget
import dateti... | [
[
1,
0,
0.0286,
0.0286,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0571,
0.0286,
0,
0.66,
0.125,
698,
0,
1,
0,
0,
698,
0,
0
],
[
1,
0,
0.0857,
0.0286,
0,
0... | [
"from django import forms",
"from pirate_actions.models import Action",
"from pirate_topics.models import Topic",
"from pirate_core.forms import FormMixin",
"from markitup.widgets import MarkItUpWidget",
"from pirate_core.widgets import SelectTimeWidget, HorizRadioRenderer",
"from django.forms.extras im... |
"""
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.1522,
0.2609,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.3478,
0.0435,
0,
0.66,
0.3333,
944,
0,
1,
0,
0,
944,
0,
0
],
[
3,
0,
0.5435,
0.2609,
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 def test_basic_a... |
# Create your views here.
| [] | [] |
"""Integrates django-notification into the OpenAssembly system.
pirate_messages.models.create_notification users signals to create
flexible notifications from django-notifications
"""
from django.contrib.sites.models import Site
from django.conf import settings
from django.db.models import signals
current_si... | [
[
8,
0,
0.1136,
0.1818,
0,
0.66,
0,
0,
1,
0,
0,
0,
0,
0,
0
],
[
1,
0,
0.2273,
0.0455,
0,
0.66,
0.1667,
890,
0,
1,
0,
0,
890,
0,
0
],
[
1,
0,
0.2727,
0.0455,
0,
0.66... | [
"\"\"\"Integrates django-notification into the OpenAssembly system.\n pirate_messages.models.create_notification users signals to create \n flexible notifications from django-notifications\n\"\"\"",
"from django.contrib.sites.models import Site",
"from django.conf import settings",
"from django.db.model... |
from django.db import models
class RankingDimension(models.Model):
#Dimensions store
name = models.CharField(max_length=70)
created_dt = models.DateTimeField(auto_now_add=True)
modified_dt = models.DateTimeField(auto_now=True)
class BaseRankingAbstractModel(models.Model):
# Generic ranking objec... | [
[
1,
0,
0.0435,
0.0435,
0,
0.66,
0,
40,
0,
1,
0,
0,
40,
0,
0
],
[
3,
0,
0.2609,
0.2174,
0,
0.66,
0.5,
883,
0,
0,
0,
0,
996,
0,
3
],
[
14,
1,
0.2609,
0.0435,
1,
0.78... | [
"from django.db import models",
"class RankingDimension(models.Model):\n #Dimensions store\n name = models.CharField(max_length=70)\n created_dt = models.DateTimeField(auto_now_add=True)\n modified_dt = models.DateTimeField(auto_now=True)",
" name = models.CharField(max_length=70)",
" create... |
from BeautifulSoup import BeautifulSoup
acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',
'blockquote', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col',
'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em',
'font', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', '... | [
[
1,
0,
0.0175,
0.0175,
0,
0.66,
0,
878,
0,
1,
0,
0,
878,
0,
0
],
[
14,
0,
0.114,
0.1404,
0,
0.66,
0.1667,
226,
0,
0,
0,
0,
0,
5,
0
],
[
14,
0,
0.2895,
0.1754,
0,
0... | [
"from BeautifulSoup import BeautifulSoup",
"acceptable_elements = ['a', 'abbr', 'acronym', 'address', 'area', 'b', 'big',\n 'blockquote', 'br', 'button', 'caption', 'center', 'cite', 'code', 'col',\n 'colgroup', 'dd', 'del', 'dfn', 'dir', 'div', 'dl', 'dt', 'em',\n 'font', 'h1', 'h2', 'h3', 'h4', '... |
import hashlib
from django.utils.translation import ugettext_lazy as _
from google.appengine.api import images
from exceptions import ValueError, TypeError
from django import forms
from django.utils.datastructures import SortedDict
from pirate_core import HttpRedirectException
class FormMixin(object):
@classme... | [
[
1,
0,
0.0037,
0.0037,
0,
0.66,
0,
154,
0,
1,
0,
0,
154,
0,
0
],
[
1,
0,
0.0112,
0.0037,
0,
0.66,
0.1,
389,
0,
1,
0,
0,
389,
0,
0
],
[
1,
0,
0.0149,
0.0037,
0,
0.6... | [
"import hashlib",
"from django.utils.translation import ugettext_lazy as _",
"from google.appengine.api import images",
"from exceptions import ValueError, TypeError",
"from django import forms",
"from django.utils.datastructures import SortedDict",
"from pirate_core import HttpRedirectException",
"cl... |
import testlib, pirate_core
__test__ = testlib.get_test_dict(pirate_core, locals())
| [
[
1,
0,
0.5,
0.25,
0,
0.66,
0,
552,
0,
2,
0,
0,
552,
0,
0
],
[
14,
0,
1,
0.25,
0,
0.66,
1,
761,
3,
2,
0,
0,
805,
10,
2
]
] | [
"import testlib, pirate_core",
"__test__ = testlib.get_test_dict(pirate_core, locals())"
] |
from django.http import HttpResponseRedirect
from django.contrib.contenttypes.models import ContentType
from customtags.decorators import block
from pirate_core import FormMixin, ComboFormFactory, namespace_get
from django import template
from customtags.decorators import block_decorator
register = template.Library(... | [
[
1,
0,
0.0127,
0.0064,
0,
0.66,
0,
779,
0,
1,
0,
0,
779,
0,
0
],
[
1,
0,
0.0191,
0.0064,
0,
0.66,
0.1111,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0318,
0.0064,
0,
... | [
"from django.http import HttpResponseRedirect",
"from django.contrib.contenttypes.models import ContentType",
"from customtags.decorators import block",
"from pirate_core import FormMixin, ComboFormFactory, namespace_get",
"from django import template",
"from customtags.decorators import block_decorator",... |
import math, re
from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist, resolve_variable
from django.conf import settings
register = Library()
DIV_TEMPLATE = "<div id=\"star_strip_%s\">"
END_DIV_TEMPLATE= "</div>"
IMG_TEMPLATE = "<img border=\"0\" src=\"%s\" alt=\"%s\"/>"
EX_IMG_TEMPLAT... | [
[
1,
0,
0.006,
0.006,
0,
0.66,
0,
526,
0,
2,
0,
0,
526,
0,
0
],
[
1,
0,
0.0181,
0.006,
0,
0.66,
0.0556,
213,
0,
5,
0,
0,
213,
0,
0
],
[
1,
0,
0.0241,
0.006,
0,
0.66... | [
"import math, re",
"from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist, resolve_variable",
"from django.conf import settings",
"register = Library()",
"DIV_TEMPLATE\t= \"<div id=\\\"star_strip_%s\\\">\"",
"END_DIV_TEMPLATE= \"</div>\"",
"IMG_TEMPLATE\t= \"<img border=\\... |
from django import template
from django import forms
from django.http import HttpResponseRedirect
import datetime
from django.contrib.contenttypes.models import ContentType
from tagging.models import Tag, TaggedItem
from django.db.models import get_model
from pirate_consensus.models import Consensus
from settings impor... | [
[
1,
0,
0.0026,
0.0026,
0,
0.66,
0,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0051,
0.0026,
0,
0.66,
0.0286,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0077,
0.0026,
0,
... | [
"from django import template",
"from django import forms",
"from django.http import HttpResponseRedirect",
"import datetime",
"from django.contrib.contenttypes.models import ContentType",
"from tagging.models import Tag, TaggedItem",
"from django.db.models import get_model",
"from pirate_consensus.mod... |
from exceptions import ValueError
from django import template
from django.db import models
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
import string
from customtags.decorators import function_decorator
register = template.Library()
function = function_decora... | [
[
1,
0,
0.0058,
0.0058,
0,
0.66,
0,
63,
0,
1,
0,
0,
63,
0,
0
],
[
1,
0,
0.0175,
0.0058,
0,
0.66,
0.0769,
294,
0,
1,
0,
0,
294,
0,
0
],
[
1,
0,
0.0234,
0.0058,
0,
0.... | [
"from exceptions import ValueError",
"from django import template",
"from django.db import models",
"from django.core.urlresolvers import reverse",
"from django.contrib.contenttypes.models import ContentType",
"import string",
"from customtags.decorators import function_decorator",
"register = templat... |
import re
from django.forms.extras.widgets import SelectDateWidget
from django.forms.widgets import Widget, Select, MultiWidget
from django.utils.safestring import mark_safe
from django import forms
__all__ = ('SelectTimeWidget', 'SplitSelectDateTimeWidget')
# Attempt to match many time formats:
# Example: "12:34:56 ... | [
[
1,
0,
0.0055,
0.0055,
0,
0.66,
0,
540,
0,
1,
0,
0,
540,
0,
0
],
[
1,
0,
0.011,
0.0055,
0,
0.66,
0.0769,
648,
0,
1,
0,
0,
648,
0,
0
],
[
1,
0,
0.0166,
0.0055,
0,
0... | [
"import re",
"from django.forms.extras.widgets import SelectDateWidget",
"from django.forms.widgets import Widget, Select, MultiWidget",
"from django.utils.safestring import mark_safe",
"from django import forms",
"__all__ = ('SelectTimeWidget', 'SplitSelectDateTimeWidget')",
"time_pattern = r'(\\d\\d?)... |
from pirate_core.views import *
from pirate_core.models import *
from pirate_core.forms import *
| [
[
1,
0,
0.25,
0.25,
0,
0.66,
0,
587,
0,
1,
0,
0,
587,
0,
0
],
[
1,
0,
0.5,
0.25,
0,
0.66,
0.5,
766,
0,
1,
0,
0,
766,
0,
0
],
[
1,
0,
0.75,
0.25,
0,
0.66,
1,
... | [
"from pirate_core.views import *",
"from pirate_core.models import *",
"from pirate_core.forms import *"
] |
from django.contrib.contenttypes.models import ContentType
from django.template import add_to_builtins
import datetime
from pirate_forum.models import View, create_view
from google.appengine.ext import deferred
TYPE_KEY = "_t"
OBJ_KEY = "_o"
START_KEY = "_s"
END_KEY = "_e"
DIM_KEY = "_d"
SCROLL_KEY = "_c"
RETURN_KEY =... | [
[
1,
0,
0.0071,
0.0071,
0,
0.66,
0,
469,
0,
1,
0,
0,
469,
0,
0
],
[
1,
0,
0.0142,
0.0071,
0,
0.66,
0.0625,
213,
0,
1,
0,
0,
213,
0,
0
],
[
1,
0,
0.0213,
0.0071,
0,
... | [
"from django.contrib.contenttypes.models import ContentType",
"from django.template import add_to_builtins",
"import datetime",
"from pirate_forum.models import View, create_view",
"from google.appengine.ext import deferred",
"TYPE_KEY = \"_t\"",
"OBJ_KEY = \"_o\"",
"START_KEY = \"_s\"",
"END_KEY = ... |
#!/usr/bin/env python
# Add "common-apps" folder to sys.path if it exists
import os, sys
common_dir = os.path.join(os.path.dirname(__file__), 'common-apps')
if os.path.exists(common_dir):
sys.path.append(common_dir)
# Initialize App Engine SDK if djangoappengine backend is installed
try:
from djangoappengine.... | [
[
1,
0,
0.1538,
0.0385,
0,
0.66,
0,
688,
0,
2,
0,
0,
688,
0,
0
],
[
14,
0,
0.1923,
0.0385,
0,
0.66,
0.1667,
545,
3,
2,
0,
0,
933,
10,
2
],
[
4,
0,
0.25,
0.0769,
0,
... | [
"import os, sys",
"common_dir = os.path.join(os.path.dirname(__file__), 'common-apps')",
"if os.path.exists(common_dir):\n sys.path.append(common_dir)",
" sys.path.append(common_dir)",
"try:\n from djangoappengine.boot import setup_env\nexcept ImportError:\n pass\nelse:\n setup_env()",
" ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.