code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.8, 0.2, 0, 0.66, 1, 669,...
[ "import cgi", "import os", "import fckeditor" ]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 688, 0, 1, 0, 0, 688, 0, 0 ] ]
[ "import cgi", "import os" ]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.5, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.8, 0.2, 0, 0.66, 1, 669,...
[ "import cgi", "import os", "import fckeditor" ]
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2010 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") h...
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.6667, 0.3333, 0, 0.66, 1, 688, 0, 1, 0, 0, 688, 0, 0 ] ]
[ "import cgi", "import os" ]
#-*- coding: utf-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template.loader import get_template from django.template import RequestContext from google.appengine.ext import db from django.conf import settings from models.main import App_u...
[ [ 1, 0, 0.023, 0.0115, 0, 0.66, 0, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0345, 0.0115, 0, 0.66, 0.0667, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.046, 0.0115, 0, 0....
[ "from django.http import HttpResponse, HttpResponseRedirect", "from django.shortcuts import render_to_response", "from django.template.loader import get_template", "from django.template import RequestContext", "from google.appengine.ext import db", "from django.conf import settings", "from models.main i...
#-*- coding: utf-8 -*- from django.http import HttpResponse, HttpResponseRedirect from google.appengine.api import images from google.appengine.ext import db from models.main import App_user, Post, Comment, Tag from common.view_decorator import role_required from logics.main import get_user, set_user import datetime i...
[ [ 1, 0, 0.037, 0.0185, 0, 0.66, 0, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0.0769, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0741, 0.0185, 0, 0...
[ "from django.http import HttpResponse, HttpResponseRedirect", "from google.appengine.api import images", "from google.appengine.ext import db", "from models.main import App_user, Post, Comment, Tag", "from common.view_decorator import role_required", "from logics.main import get_user, set_user", "import...
#!/usr/bin/env 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.\nYou'll ha...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.24, ...
[ "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 directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
import logging, os, sys # Google App Engine imports. from google.appengine.ext.webapp import util # Remove the standard version of Django. for k in [k for k in sys.modules if k.startswith('django')]: del sys.modules[k] # Force sys.path to have our own directory first, in case we want to import # from it. #sys.pa...
[ [ 1, 0, 0.0182, 0.0182, 0, 0.66, 0, 715, 0, 3, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0727, 0.0182, 0, 0.66, 0.0714, 8, 0, 1, 0, 0, 8, 0, 0 ], [ 6, 0, 0.1364, 0.0364, 0, 0.66...
[ "import logging, os, sys", "from google.appengine.ext.webapp import util", "for k in [k for k in sys.modules if k.startswith('django')]:\n del sys.modules[k]", "os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'", "libs_path = os.path.abspath('libs')", "django_path = os.path.abspath('libs/django.zip')",...
#-*- coding: utf-8 -*- import os, sys, tempfile has_set = False BASE_DIR = os.path.dirname(os.path.dirname(__file__)) import logging logging.basicConfig(format='%(asctime)s %(levelname)8s %(message)s', stream=sys.stdout) #logging.basicConfig(format='%(asctime)s %(levelname)8s %(message)s', # filenam...
[ [ 1, 0, 0.0364, 0.0182, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0545, 0.0182, 0, 0.66, 0.125, 973, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.0727, 0.0182, 0, 0...
[ "import os, sys, tempfile", "has_set = False", "BASE_DIR = os.path.dirname(os.path.dirname(__file__))", "import logging", "logging.basicConfig(format='%(asctime)s %(levelname)8s %(message)s', stream=sys.stdout)", "logging.getLogger().setLevel(logging.NOTSET)", "def set_app_evn():\n global has_set\n ...
#-*- coding: utf-8 -*- import set_app_evn from set_app_evn import BASE_DIR import ai import Image, ImageFilter, ImageEnhance def register(opener): reg_info = { 'user': 'aksdj990sddddf', 'passwd': 'wushiyito', 'passwdAgain': 'wushiyito', 'answer': 'asdfasdfa', 'question': '...
[ [ 1, 0, 0.0303, 0.0152, 0, 0.66, 0, 920, 0, 1, 0, 0, 920, 0, 0 ], [ 1, 0, 0.0455, 0.0152, 0, 0.66, 0.1667, 920, 0, 1, 0, 0, 920, 0, 0 ], [ 1, 0, 0.0758, 0.0152, 0, ...
[ "import set_app_evn", "from set_app_evn import BASE_DIR", "import ai", "import Image, ImageFilter, ImageEnhance", "def register(opener):\n reg_info = {\n 'user': 'aksdj990sddddf',\n 'passwd': 'wushiyito',\n 'passwdAgain': 'wushiyito',\n 'answer': 'asdfasdfa',\n\n 'quest...
#-*- coding: utf-8 -*- from threading import local _thread_locals = local() def get_user(): try: return _thread_locals.user except: return None def set_user(u): _thread_locals.user = u
[ [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 14, 0, 0.3077, 0.0769, 0, 0.66, 0.3333, 373, 3, 0, 0, 0, 605, 10, 1 ], [ 2, 0, 0.6154, 0.3846, 0, ...
[ "from threading import local", "_thread_locals = local()", "def get_user():\n try:\n return _thread_locals.user\n except:\n return None", " try:\n return _thread_locals.user\n except:\n return None", " return _thread_locals.user", " return None", "de...
#-*- coding: utf-8 -*- from google.appengine.ext import db import datetime import generalcounter from logics.main import get_user, set_user import re class App_user(db.Model): email = db.EmailProperty(required = True) nickname = db.StringProperty(required = True) link = db.StringProperty() level = d...
[ [ 1, 0, 0.0105, 0.0053, 0, 0.66, 0, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.0211, 0.0053, 0, 0.66, 0.1111, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0263, 0.0053, 0, ...
[ "from google.appengine.ext import db", "import datetime", "import generalcounter", "from logics.main import get_user, set_user", "import re", "class App_user(db.Model):\n email = db.EmailProperty(required = True)\n nickname = db.StringProperty(required = True)\n link = db.StringProperty()\n\n ...
#!/usr/bin/env 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.\nYou'll ha...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.17, ...
[ "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 directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
from django.conf.urls.defaults import * urlpatterns = patterns('views.main', ('^$', 'index'), ('^(?P<page>\d+)/$', 'index'), ('^p/(?P<post_key>.+)/$', 'show_post'), ('^add_comment/$', 'add_comment'), ('^atom.xml$', 'atom'), ('^sitemap.xml$', 'sitemap'), (r'^admin/', include...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.425, 0.6, 0, 0.66, 1, 990, 3, 8, 0, 0, 75, 10, 2 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('views.main',\n ('^$', 'index'),\n ('^(?P<page>\\d+)/$', 'index'),\n ('^p/(?P<post_key>.+)/$', 'show_post'),\n\n ('^add_comment/$', 'add_comment'),\n ('^atom.xml$', 'atom'),\n ('^sitemap.xml$', 'sitemap')," ]
#-*- coding: utf-8 -*- import os, sys, os.path VERSION = '0.001' LOCAL = False DEBUG = True TEMPLATE_DEBUG = DEBUG APPEND_SLASH = True ROOT_PATH = os.path.dirname(__file__) if LOCAL: BASE_URL = 'http://localhost:8080' DOMAIN = 'localhost' else: BASE_URL = 'http://www.3kkk.me' DOMAIN = 'www.3kkk.me'...
[ [ 1, 0, 0.0198, 0.0099, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0396, 0.0099, 0, 0.66, 0.0385, 557, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0594, 0.0099, 0, ...
[ "import os, sys, os.path", "VERSION = '0.001'", "LOCAL = False", "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "APPEND_SLASH = True", "ROOT_PATH = os.path.dirname(__file__)", "if LOCAL:\n BASE_URL = 'http://localhost:8080'\n DOMAIN = 'localhost'\nelse:\n BASE_URL = 'http://www.3kkk.me'\n DOMAI...
from django.conf.urls.defaults import * urlpatterns = patterns('admin.views', ('^$', 'index'), ('^left/$', 'left'), ('^post_list/$', 'post_list'), ('^add_post/', 'add_post'), ('^comment_list/$', 'comment_list'), ('^user_list/', 'user_list'), ('^add_post_post/', 'add_post_post')...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.5484, 0.9355, 0, 0.66, 1, 990, 3, 20, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('admin.views',\n ('^$', 'index'),\n ('^left/$', 'left'),\n\n ('^post_list/$', 'post_list'),\n ('^add_post/', 'add_post'),\n ('^comment_list/$', 'comment_list'),\n ('^user_list/', 'user_list')," ]
#-*- coding: utf-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response from django.template.loader import get_template from django.template import RequestContext from google.appengine.ext import db from common.view_decorator import role_required from models.m...
[ [ 1, 0, 0.0099, 0.005, 0, 0.66, 0, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0149, 0.005, 0, 0.66, 0.0385, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0198, 0.005, 0, 0.6...
[ "from django.http import HttpResponse, HttpResponseRedirect", "from django.shortcuts import render_to_response", "from django.template.loader import get_template", "from django.template import RequestContext", "from google.appengine.ext import db", "from common.view_decorator import role_required", "fro...
''' Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: Redistributions of source code must retain the above copyright notice, this list of conditions and the ...
[ [ 8, 0, 0.12, 0.22, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.26, 0.02, 0, 0.66, 0.1, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 1, 0, 0.28, 0.02, 0, 0.66, 0.2, ...
[ "'''\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\nRedistributions of source code must retain the above copyright notice, this list of condition...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.0178, 0.0343, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0382, 0.0013, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0395, 0.0013, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1116, 0.2149, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2314, 0.0083, 0, 0.66, 0.3333, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.2397, 0.0083, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
import Cookie import os from appengine_utilities import sessions class SessionMiddleware(object): TEST_COOKIE_NAME = 'testcookie' TEST_COOKIE_VALUE = 'worked' def process_request(self, request): """ Check to see if a valid session token exists, if not, then use a cookie only sess...
[ [ 1, 0, 0.0161, 0.0161, 0, 0.66, 0, 32, 0, 1, 0, 0, 32, 0, 0 ], [ 1, 0, 0.0323, 0.0161, 0, 0.66, 0.3333, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0645, 0.0161, 0, 0....
[ "import Cookie", "import os", "from appengine_utilities import sessions", "class SessionMiddleware(object):\n TEST_COOKIE_NAME = 'testcookie'\n TEST_COOKIE_VALUE = 'worked'\n\n def process_request(self, request):\n \"\"\"\n Check to see if a valid session token exists, if not,\n ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1776, 0.3421, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3553, 0.0132, 0, 0.66, 0.25, 593, 0, 1, 0, 0, 593, 0, 0 ], [ 3, 0, 0.6711, 0.5658, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.1134, 0.2185, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2437, 0.0084, 0, 0.66,...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.2935, 0.5652, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6087, 0.0217, 0, 0.66, 0.5, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 3, 0, 0.8261, 0.3696, 0, 0.66, ...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
""" Copyright (c) 2008, appengine-utilities project All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and ...
[ [ 8, 0, 0.0509, 0.0981, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1094, 0.0038, 0, 0.66, 0.0909, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.1132, 0.0038, 0, 0.66...
[ "\"\"\"\nCopyright (c) 2008, appengine-utilities project\nAll rights reserved.\n\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n- Redistributions of source code must retain the above copyright notice, this\n list of ...
#-*- coding: utf-8 -*- from google.appengine.api import users from models.main import App_user from django.http import HttpResponse, HttpResponseRedirect import datetime from logics.main import get_user, set_user def logout(request): url = request.GET.get('url', '/') request.session['email'] = '' return ...
[ [ 1, 0, 0.0465, 0.0233, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0698, 0.0233, 0, 0.66, 0.1667, 524, 0, 1, 0, 0, 524, 0, 0 ], [ 1, 0, 0.093, 0.0233, 0, 0...
[ "from google.appengine.api import users", "from models.main import App_user", "from django.http import HttpResponse, HttpResponseRedirect", "import datetime", "from logics.main import get_user, set_user", "def logout(request):\n url = request.GET.get('url', '/')\n request.session['email'] = ''\n ...
from django.conf import settings def bind_settings(request): return { 'settings': settings }
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 2, 0, 0.75, 0.6667, 0, 0.66, 1, 846, 0, 1, 1, 0, 0, 0, 0 ], [ 13, 1, 0.8333, 0.5, 1, 0.11, 0...
[ "from django.conf import settings", "def bind_settings(request):\n return {\n 'settings': settings\n }", " return {\n 'settings': settings\n }" ]
#-*- coding: utf-8 -*- from django.http import HttpResponsePermanentRedirect from django.conf import settings class Domain_transMiddleware(object): def process_request(self, request): base_url = settings.BASE_URL domain = settings.DOMAIN if request.META['SERVER_NAME']!='localhost' and req...
[ [ 1, 0, 0.2, 0.0667, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.2667, 0.0667, 0, 0.66, 0.5, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 3, 0, 0.7, 0.6667, 0, 0.66, ...
[ "from django.http import HttpResponsePermanentRedirect", "from django.conf import settings", "class Domain_transMiddleware(object):\n def process_request(self, request):\n base_url = settings.BASE_URL\n domain = settings.DOMAIN\n if request.META['SERVER_NAME']!='localhost' and request.M...
#-*- coding: utf-8 -*- from django import template from models.main import App_user, Post, Comment, Tag, Sidebar from django.template import Node, NodeList, Template, Context, Variable register = template.Library() class Sidebar_c(template.Node): def __init__(self, nodelist_loop): self.nodelist_...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.037, 0.0185, 0, 0.66, 0.1429, 524, 0, 5, 0, 0, 524, 0, 0 ], [ 1, 0, 0.0741, 0.0185, 0, 0...
[ "from django import template", "from models.main import App_user, Post, Comment, Tag, Sidebar", "from django.template import Node, NodeList, Template, Context, Variable", "register = template.Library()", "class Sidebar_c(template.Node):\n def __init__(self, nodelist_loop):\n self.nodelist_loop = n...
#coding=utf-8 from django import template from django.template.defaultfilters import stringfilter import datetime register = template.Library() from common import time_utils from common.utils import process_html import hashlib from google.appengine.api import users def make_list(start, end): """ ...
[ [ 1, 0, 0.0303, 0.0152, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0455, 0.0152, 0, 0.66, 0.0303, 913, 0, 1, 0, 0, 913, 0, 0 ], [ 1, 0, 0.0606, 0.0152, 0, ...
[ "from django import template", "from django.template.defaultfilters import stringfilter", "import datetime", "register = template.Library()", "from common import time_utils", "from common.utils import process_html", "import hashlib", "from google.appengine.api import users", "def make_list(start, en...
#-*- coding: utf-8 -*- import traceback, sys, cStringIO import datetime, time, cgi import pytz from django.conf import settings def get_utc_time(dt = None): if dt is None: dt = datetime.datetime.utcnow() if dt.tzinfo is None: dt = dt.replace(tzinfo = pytz.utc) if dt.tzname()!='UTC': ...
[ [ 1, 0, 0.0253, 0.0127, 0, 0.66, 0, 423, 0, 3, 0, 0, 423, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0.66, 0.0769, 426, 0, 3, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0506, 0.0127, 0, 0...
[ "import traceback, sys, cStringIO", "import datetime, time, cgi", "import pytz", "from django.conf import settings", "def get_utc_time(dt = None):\n if dt is None:\n dt = datetime.datetime.utcnow()\n if dt.tzinfo is None:\n dt = dt.replace(tzinfo = pytz.utc)\n \n if dt.tzname()!='U...
#-*- coding: utf-8 -*- import traceback, sys, cStringIO import datetime, time, cgi import pytz, re from django.conf import settings from BeautifulSoup import BeautifulSoup def get_err(): f = cStringIO.StringIO( ) traceback.print_exc(file=f) return f.getvalue( ) def print_err(): sys.stderr.write('err ...
[ [ 1, 0, 0.0312, 0.0156, 0, 0.66, 0, 423, 0, 3, 0, 0, 423, 0, 0 ], [ 1, 0, 0.0469, 0.0156, 0, 0.66, 0.0833, 426, 0, 3, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0625, 0.0156, 0, ...
[ "import traceback, sys, cStringIO", "import datetime, time, cgi", "import pytz, re", "from django.conf import settings", "from BeautifulSoup import BeautifulSoup", "def get_err():\n f = cStringIO.StringIO( )\n traceback.print_exc(file=f)\n return f.getvalue( )", " f = cStringIO.StringIO( )",...
from google.appengine.api import users from logics.main import get_user, set_user from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden def role_required(role): def wrapper(handler_method): def check_login(request, *args, **kwargs): user = get_user() if n...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0.3333, 751, 0, 2, 0, 0, 751, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, ...
[ "from google.appengine.api import users", "from logics.main import get_user, set_user", "from django.http import HttpResponse, HttpResponseRedirect, HttpResponseForbidden", "def role_required(role):\n def wrapper(handler_method):\n def check_login(request, *args, **kwargs):\n user = get_u...
#!/usr/bin/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 or a...
[ [ 8, 0, 0.0857, 0.0667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1238, 0.0032, 0, 0.66, 0.0476, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.127, 0.0032, 0, 0.66,...
[ "\"\"\"\nAn interactive, stateful AJAX shell that runs Python code on the server.\n\nPart of http://code.google.com/p/google-app-engine-samples/.\n\nMay be run as a standalone app or in an existing app as an admin-only handler.\nCan be used for system administration tasks, as an interactive way to try out\nAPIs, or...
#-*- coding: utf-8 -*- import socks_proxy as socks import browser_agent as ai import urllib2, os, threading, time def get_one_proxy_opener(p): #proxy=urllib2.ProxyHandler({'http':p[0]}) cookie=urllib2.HTTPCookieProcessor() #opener=urllib2.build_opener(proxy, cookie) opener=urllib2.build_op...
[ [ 1, 0, 0.0286, 0.0095, 0, 0.66, 0, 525, 0, 1, 0, 0, 525, 0, 0 ], [ 1, 0, 0.0381, 0.0095, 0, 0.66, 0.1429, 33, 0, 1, 0, 0, 33, 0, 0 ], [ 1, 0, 0.0476, 0.0095, 0, 0....
[ "import socks_proxy as socks", "import browser_agent as ai", "import urllib2, os, threading, time", "def get_one_proxy_opener(p):\n #proxy=urllib2.ProxyHandler({'http':p[0]})\n cookie=urllib2.HTTPCookieProcessor()\n\n #opener=urllib2.build_opener(proxy, cookie)\n opener=urllib2.build_opener(cookie...
from browser_agent import *
[ [ 1, 0, 1, 1, 0, 0.66, 0, 33, 0, 1, 0, 0, 33, 0, 0 ] ]
[ "from browser_agent import *" ]
#!/usr/bin/env python ''' $Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $ ''' from cStringIO import StringIO from datetime import datetime, timedelta from struct import unpack, calcsize from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo from pytz.tzinfo import memorized_datetime, memorized_timede...
[ [ 8, 0, 0.0265, 0.0265, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0531, 0.0088, 0, 0.66, 0.1429, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0619, 0.0088, 0, 0.66...
[ "'''\n$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $\n'''", "from cStringIO import StringIO", "from datetime import datetime, timedelta", "from struct import unpack, calcsize", "from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo", "from pytz.tzinfo import memorized_datetime, memorize...
#!/usr/bin/env python ''' $Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $ ''' from cStringIO import StringIO from datetime import datetime, timedelta from struct import unpack, calcsize from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo from pytz.tzinfo import memorized_datetime, memorized_timede...
[ [ 8, 0, 0.0265, 0.0265, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0531, 0.0088, 0, 0.66, 0.1429, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0619, 0.0088, 0, 0.66...
[ "'''\n$Id: tzfile.py,v 1.8 2004/06/03 00:15:24 zenzen Exp $\n'''", "from cStringIO import StringIO", "from datetime import datetime, timedelta", "from struct import unpack, calcsize", "from pytz.tzinfo import StaticTzInfo, DstTzInfo, memorized_ttinfo", "from pytz.tzinfo import memorized_datetime, memorize...
''' Reference tzinfo implementations from the Python docs. Used for testing against as they are only correct for the years 1987 to 2006. Do not use these for real code. ''' from datetime import tzinfo, timedelta, datetime from pytz import utc, UTC, HOUR, ZERO # A class building tzinfo objects for fixed-offset time zo...
[ [ 8, 0, 0.0236, 0.0394, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0551, 0.0079, 0, 0.66, 0.0588, 426, 0, 3, 0, 0, 426, 0, 0 ], [ 1, 0, 0.063, 0.0079, 0, 0.66,...
[ "'''\nReference tzinfo implementations from the Python docs.\nUsed for testing against as they are only correct for the years\n1987 to 2006. Do not use these for real code.\n'''", "from datetime import tzinfo, timedelta, datetime", "from pytz import utc, UTC, HOUR, ZERO", "class FixedOffset(tzinfo):\n \"\"...
#!/usr/bin/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 or a...
[ [ 8, 0, 0.0857, 0.0667, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1238, 0.0032, 0, 0.66, 0.0476, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.127, 0.0032, 0, 0.66,...
[ "\"\"\"\nAn interactive, stateful AJAX shell that runs Python code on the server.\n\nPart of http://code.google.com/p/google-app-engine-samples/.\n\nMay be run as a standalone app or in an existing app as an admin-only handler.\nCan be used for system administration tasks, as an interactive way to try out\nAPIs, or...
#-*- coding: utf-8 -*- import math class Pager(object): def __init__(self, total, pageSize, page, page_list_num = 10): pageCount = int(math.ceil((total+0.0)/pageSize)) if page < 1: page = 1 if page > pageCount: page = pageCount offset = 2 ...
[ [ 1, 0, 0.0154, 0.0077, 0, 0.66, 0, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 3, 0, 0.5154, 0.9769, 0, 0.66, 1, 264, 0, 3, 0, 0, 186, 0, 12 ], [ 2, 1, 0.25, 0.4308, 1, 0.51, ...
[ "import math", "class Pager(object):\n def __init__(self, total, pageSize, page, page_list_num = 10):\n pageCount = int(math.ceil((total+0.0)/pageSize))\n if page < 1:\n page = 1\n if page > pageCount:\n page = pageCount", " def __init__(self, total, pageSize, pa...
# Copyright 2008 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 writing, ...
[ [ 1, 0, 0.16, 0.01, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.17, 0.01, 0, 0.66, 0.125, 167, 0, 1, 0, 0, 167, 0, 0 ], [ 1, 0, 0.18, 0.01, 0, 0.66, 0.2...
[ "from google.appengine.api import memcache", "from google.appengine.ext import db", "import random", "class GeneralCounterShardConfig(db.Model):\n \"\"\"Tracks the number of shards for each named counter.\"\"\"\n name = db.StringProperty(required=True)\n num_shards = db.IntegerProperty(required=True, defau...
#!/usr/bin/env python # Copyright (C) 2009 The Android Open Source Project # # 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 requ...
[ [ 1, 0, 0.0773, 0.0045, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0818, 0.0045, 0, 0.66, 0.1, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0864, 0.0045, 0, 0.6...
[ "import os", "import re", "import string", "import sys", "trace_line = re.compile(\"(.*)(\\#[0-9]+) (..) ([0-9a-f]{8}) ([^\\r\\n \\t]*)\")", "def CallAddr2Line(lib, addr):\n global symbols_dir\n global addr2line_cmd\n global cppfilt_cmd\n\n if lib != \"\":\n cmd = addr2line_cmd + \\\n \" -...
#!/usr/bin/env python import os import re import sys def fail_with_usage(): sys.stderr.write("usage: java-layers.py DEPENDENCY_FILE SOURCE_DIRECTORIES...\n") sys.stderr.write("\n") sys.stderr.write("Enforces layering between java packages. Scans\n") sys.stderr.write("DIRECTORY and prints errors when the pack...
[ [ 1, 0, 0.0117, 0.0039, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0156, 0.0039, 0, 0.66, 0.0714, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0195, 0.0039, 0, ...
[ "import os", "import re", "import sys", "def fail_with_usage():\n sys.stderr.write(\"usage: java-layers.py DEPENDENCY_FILE SOURCE_DIRECTORIES...\\n\")\n sys.stderr.write(\"\\n\")\n sys.stderr.write(\"Enforces layering between java packages. Scans\\n\")\n sys.stderr.write(\"DIRECTORY and prints errors whe...
#!/usr/bin/env python # This file uses the following encoding: utf-8 import sys import re if len(sys.argv) == 1: print 'usage: ' + sys.argv[0] + ' <build.log>' sys.exit() # if you add another level, don't forget to give it a color below class severity: UNKNOWN=0 SKIP=100 FIXMENOW=1 HIGH=2 ...
[ [ 1, 0, 0.0071, 0.0018, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0089, 0.0018, 0, 0.66, 0.0244, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 4, 0, 0.0142, 0.0053, 0, ...
[ "import sys", "import re", "if len(sys.argv) == 1:\n print('usage: ' + sys.argv[0] + ' <build.log>')\n sys.exit()", " print('usage: ' + sys.argv[0] + ' <build.log>')", " sys.exit()", "class severity:\n UNKNOWN=0\n SKIP=100\n FIXMENOW=1\n HIGH=2\n MEDIUM=3\n LOW=4\n HARMLES...
#!/usr/bin/env python # vim: ts=2 sw=2 nocindent import re import sys def choose_regex(regs, line): for func,reg in regs: m = reg.match(line) if m: return (func,m) return (None,None) def gather(included, deps): result = set() for inc in included: result.add(inc) for d in deps: if ...
[ [ 1, 0, 0.0588, 0.0147, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0735, 0.0147, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.1397, 0.0882, 0, 0.6...
[ "import re", "import sys", "def choose_regex(regs, line):\n for func,reg in regs:\n m = reg.match(line)\n if m:\n return (func,m)\n return (None,None)", " for func,reg in regs:\n m = reg.match(line)\n if m:\n return (func,m)", " m = reg.match(line)", " if m:\n return (f...
#!/usr/bin/env python # # Copyright (C) 2009 The Android Open Source Project # # 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...
[ [ 1, 0, 0.2, 0.0118, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.2529, 0.0235, 0, 0.66, 0.2, 792, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 0, 0.3882, 0.1765, 0, 0.66, ...
[ "import sys", "def mangle_build_prop(prop):\n pass", "def mangle_default_prop(prop):\n # If ro.debuggable is 1, then enable adb on USB by default\n # (this is for userdebug builds)\n if prop.get(\"ro.debuggable\") == \"1\":\n val = prop.get(\"persist.sys.usb.config\")\n if val == \"\":\n val = \"...
#!/usr/bin/env python # # Copyright (C) 2012 The Android Open Source Project # # 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...
[ [ 1, 0, 0.2237, 0.0132, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2368, 0.0132, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 7, 0, 0.2829, 0.0526, 0, 0.6...
[ "import sys", "import os", "try:\n from hashlib import sha1\nexcept ImportError:\n from sha import sha as sha1", " from hashlib import sha1", " from sha import sha as sha1", "if len(sys.argv) < 2:\n sys.exit(0)", " sys.exit(0)", "build_info = {}", "f = open(sys.argv[1])", "for line in f:\n ...
#!/usr/bin/env python # # Copyright (C) 2008 The Android Open Source Project # # 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...
[ [ 1, 0, 0.0037, 0.0037, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0112, 0.0037, 0, 0.66, 0.0588, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.0149, 0.0037, 0, ...
[ "import sys", "import cStringIO", "import copy", "import os", "import re", "import subprocess", "import tempfile", "import zipfile", "import common", "def GetApkCerts(tf_zip):\n certmap = common.ReadApkCerts(tf_zip)\n\n # apply the key remapping to the contents of the file\n for apk, cert in ce...
#!/usr/bin/env python # # Copyright (C) 2009 The Android Open Source Project # # 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...
[ [ 1, 0, 0.4, 0.0222, 0, 0.66, 0, 616, 0, 3, 0, 0, 616, 0, 0 ], [ 2, 0, 0.4667, 0.0667, 0, 0.66, 0.3333, 852, 0, 1, 1, 0, 0, 0, 1 ], [ 14, 1, 0.4667, 0.0222, 1, 0.03...
[ "import operator, os, sys", "def get_file_size(path):\n st = os.lstat(path)\n return st.st_size;", " st = os.lstat(path)", " return st.st_size;", "def main(argv):\n output = []\n roots = argv[1:]\n for root in roots:\n base = len(root[:root.rfind(os.path.sep)])\n for dir, dirs, files in os.walk...
#!/usr/bin/env python # # Copyright (C) 2009 The Android Open Source Project # # 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...
[ [ 1, 0, 0.2347, 0.0102, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2449, 0.0102, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.4082, 0.2959, 0, 0.6...
[ "import os", "import sys", "def perform_find(mindepth, prune, dirlist, filename):\n result = []\n pruneleaves = set(map(lambda x: os.path.split(x)[1], prune))\n for rootdir in dirlist:\n rootdepth = rootdir.count(\"/\")\n for root, dirs, files in os.walk(rootdir, followlinks=True):\n # prune\n ...
#!/usr/bin/env python # # Copyright (C) 2012 The Android Open Source Project # # 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.2889, 0.2111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.4111, 0.0111, 0, 0.66, 0.3333, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.7, 0.5444, 0, 0.66, ...
[ "\"\"\"\nPrints to stdout the package names that have overlay changes between\ncurrent_overlays.txt and previous_overlays.txt.\n\nUsage: diff_package_overlays.py <current_packages.txt> <current_overlays.txt> <previous_overlays.txt>\ncurrent_packages.txt contains all package names separated by space in the current b...
#!/usr/bin/env python # # Copyright (C) 2009 The Android Open Source Project # # 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...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 764, 0, 1, 0, 0, 764, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.1429, 588, 0, 1, 0, 0, 588, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.6...
[ "import cStringIO", "import getopt", "import os", "import os.path", "import re", "import sys", "import event_log_tags", "def javaName(name):\n out = name[0].lower() + re.sub(r\"[^A-Za-z0-9]\", \"\", name.title())[1:]\n if out in keywords:\n out += \"_\"\n return out", " out = name[0].lower() ...
#!/usr/bin/python -E import sys, os, re excludes = [r'.*?/\.obj.*?', r'.*?~', r'.*?\/.DS_Store', r'.*?\/.gdb_history', r'.*?\/buildspec.mk', r'.*?/\..*?\.swp', r'.*?/out/.*?', r'.*?/install/.*?'] excludes_compiled = map(re.compile, e...
[ [ 1, 0, 0.0185, 0.0185, 0, 0.66, 0, 509, 0, 3, 0, 0, 509, 0, 0 ], [ 2, 0, 0.0926, 0.0926, 0, 0.66, 0.2, 760, 0, 1, 1, 0, 0, 0, 1 ], [ 6, 1, 0.0926, 0.0556, 1, 0.53,...
[ "import sys, os, re", "def filter_excludes(str):\n for e in excludes_compiled:\n if e.match(str):\n return False\n return True", " for e in excludes_compiled:\n if e.match(str):\n return False", " if e.match(str):\n return False", " r...
#!/usr/bin/env 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.\nYou'll have to ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.79, ...
[ "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 directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
#!/usr/bin/env 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.\nYou'll have to ...
[ [ 1, 0, 0.1818, 0.0909, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 7, 0, 0.5, 0.5455, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 2 ], [ 1, 1, 0.3636, 0.0909, 1, 0.32, ...
[ "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 directory containing %r. It appears you've customized things.\\nYou'll have to run dj...
from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', (r'^accounts/', 'amfgateway.gateway'), # Uncomment the next line to enable admin documentation: # (r'^admin/doc/', include('djan...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.7333, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('',\n (r'^accounts/', 'amfgateway.gateway'),\n\n # Uncomment the next line to enable admin documentation:\n # (r'^admin/doc/', include('django.contrib.admindocs.urls')),\n\n # Uncomment the next line for to enable the admin:\n # (r'...
# Django settings for 3rdear project. import os PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('zengsun', 'zengsun.gm@gmail.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'o...
[ [ 1, 0, 0.0294, 0.0098, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0392, 0.0098, 0, 0.66, 0.037, 660, 3, 1, 0, 0, 142, 10, 2 ], [ 14, 0, 0.0588, 0.0098, 0, ...
[ "import os", "PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))", "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n ('zengsun', 'zengsun.gm@gmail.com'),\n)", "MANAGERS = ADMINS", "DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django import newforms as forms from django.utils.translation import gettext_lazy as _ from models import Profile class ProfileForm(forms.ModelForm): class Meta: model = Profile exclude = ('user', 'report_to',) class UserForm(forms.Form): l...
[ [ 1, 0, 0.0727, 0.0182, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0909, 0.0182, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.1273, 0.0182, 0, 0....
[ "from django import newforms as forms", "from django.utils.translation import gettext_lazy as _", "from models import Profile", "class ProfileForm(forms.ModelForm):\n class Meta:\n model = Profile\n exclude = ('user', 'report_to',)", " class Meta:\n model = Profile\n exclud...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.db import models from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ # Create your models here. GENDER_CHOICES = ( ('M', _('Male')), ('F', _('Female')), ) class Profile(models.Model): """Employee ...
[ [ 1, 0, 0.0976, 0.0244, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.122, 0.0244, 0, 0.66, 0.25, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.1463, 0.0244, 0, 0.66,...
[ "from django.db import models", "from django.contrib.auth.models import User", "from django.utils.translation import gettext_lazy as _", "GENDER_CHOICES = (\n ('M', _('Male')),\n ('F', _('Female')),\n)", "class Profile(models.Model):\n \"\"\"Employee\n\n \"\"\"\n # User.attribute: username, f...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext #from django.contrib import auth from django.contrib.auth.models import User from models import Profile ...
[ [ 1, 0, 0.075, 0.025, 0, 0.66, 0, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.1, 0.025, 0, 0.66, 0.1667, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.125, 0.025, 0, 0.66, ...
[ "from django.http import HttpResponse, HttpResponseRedirect", "from django.shortcuts import render_to_response, get_object_or_404", "from django.template import RequestContext", "from django.contrib.auth.models import User", "from models import Profile", "from forms import ProfileForm, UserForm", "def r...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django import newforms as forms from django.utils.translation import gettext_lazy as _ from models import Profile class ProfileForm(forms.ModelForm): class Meta: model = Profile exclude = ('user', 'report_to',) class UserForm(forms.Form): l...
[ [ 1, 0, 0.0727, 0.0182, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.0909, 0.0182, 0, 0.66, 0.25, 389, 0, 1, 0, 0, 389, 0, 0 ], [ 1, 0, 0.1273, 0.0182, 0, 0....
[ "from django import newforms as forms", "from django.utils.translation import gettext_lazy as _", "from models import Profile", "class ProfileForm(forms.ModelForm):\n class Meta:\n model = Profile\n exclude = ('user', 'report_to',)", " class Meta:\n model = Profile\n exclud...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.db import models from django.contrib.auth.models import User from django.utils.translation import gettext_lazy as _ # Create your models here. GENDER_CHOICES = ( ('M', _('Male')), ('F', _('Female')), ) class Profile(models.Model): """Employee ...
[ [ 1, 0, 0.0976, 0.0244, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.122, 0.0244, 0, 0.66, 0.25, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.1463, 0.0244, 0, 0.66,...
[ "from django.db import models", "from django.contrib.auth.models import User", "from django.utils.translation import gettext_lazy as _", "GENDER_CHOICES = (\n ('M', _('Male')),\n ('F', _('Female')),\n)", "class Profile(models.Model):\n \"\"\"Employee\n\n \"\"\"\n # User.attribute: username, f...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext #from django.contrib import auth from django.contrib.auth.models import User from models import Profile ...
[ [ 1, 0, 0.075, 0.025, 0, 0.66, 0, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.1, 0.025, 0, 0.66, 0.1667, 852, 0, 2, 0, 0, 852, 0, 0 ], [ 1, 0, 0.125, 0.025, 0, 0.66, ...
[ "from django.http import HttpResponse, HttpResponseRedirect", "from django.shortcuts import render_to_response, get_object_or_404", "from django.template import RequestContext", "from django.contrib.auth.models import User", "from models import Profile", "from forms import ProfileForm, UserForm", "def r...
from django.contrib.auth.models import User from pyamf.remoting.gateway.django import DjangoGateway def user_list(request): return User.objects.all() gateway = DjangoGateway({ 'userlist': user_list, })
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0.3333, 653, 0, 1, 0, 0, 653, 0, 0 ], [ 2, 0, 0.5, 0.2222, 0, 0.6...
[ "from django.contrib.auth.models import User", "from pyamf.remoting.gateway.django import DjangoGateway", "def user_list(request):\n return User.objects.all()", " return User.objects.all()", "gateway = DjangoGateway({\n 'userlist': user_list,\n})" ]
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.db import models from django.contrib.auth.models import User # Create your models here. class Music(models.Model): """音乐 """ title = models.CharField(max_length=50) artist = models.CharField(max_length=50) counting = models.IntegerField() ...
[ [ 1, 0, 0.0319, 0.0106, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0426, 0.0106, 0, 0.66, 0.1667, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 3, 0, 0.1596, 0.1809, 0, 0....
[ "from django.db import models", "from django.contrib.auth.models import User", "class Music(models.Model):\n \"\"\"音乐\n \"\"\"\n title = models.CharField(max_length=50)\n artist = models.CharField(max_length=50)\n counting = models.IntegerField()\n song = models.FileField(upload_to=\"song/%Y/%...
#!/usr/bin/env python # -*- coding: UTF-8 -*- from django.db import models from django.contrib.auth.models import User # Create your models here. class Music(models.Model): """音乐 """ title = models.CharField(max_length=50) artist = models.CharField(max_length=50) counting = models.IntegerField() ...
[ [ 1, 0, 0.0319, 0.0106, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0426, 0.0106, 0, 0.66, 0.1667, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 3, 0, 0.1596, 0.1809, 0, 0....
[ "from django.db import models", "from django.contrib.auth.models import User", "class Music(models.Model):\n \"\"\"音乐\n \"\"\"\n title = models.CharField(max_length=50)\n artist = models.CharField(max_length=50)\n counting = models.IntegerField()\n song = models.FileField(upload_to=\"song/%Y/%...
# Create your views here.
[]
[]
# # 3DStudyMaze is a Panda3D application for building and # running an education course in virtual environment. # # It will feature: # - Simple maze definition language # - Connectivity between mazes # - Auto-adjusting room and tunnel sizes # - Support-ticket instructor locks # - LaTeX-editable walls # # It is based on...
[ [ 1, 0, 0.0256, 0.001, 0, 0.66, 0, 135, 0, 1, 0, 0, 135, 0, 0 ], [ 1, 0, 0.0265, 0.001, 0, 0.66, 0.0333, 810, 0, 1, 0, 0, 810, 0, 0 ], [ 1, 0, 0.0275, 0.001, 0, 0.6...
[ "import direct.directbase.DirectStart", "from panda3d.core import WindowProperties", "from panda3d.core import TextNode", "from panda3d.core import Point2, Point3, Vec3, Vec4", "from direct.task.Task import Task", "from direct.gui.OnscreenText import OnscreenText", "from direct.showbase.DirectObject imp...
# Maze Root root = Entrance(Point3(0,-10,0), dim=Point2(0,0), direction='back') for directory in sorted([d for d in os.listdir('mazes') if os.path.isdir(os.path.join('mazes',d))]): guess = os.path.join(os.getcwd(),os.path.join(os.path.join('mazes',directory),'maze.py')) if os.path.exists(guess): # Tod...
[ [ 14, 0, 0.3333, 0.1111, 0, 0.66, 0, 696, 3, 3, 0, 0, 554, 10, 3 ], [ 6, 0, 0.7778, 0.5556, 0, 0.66, 1, 229, 3, 0, 0, 0, 0, 0, 10 ], [ 14, 1, 0.6667, 0.1111, 1, 0.9...
[ "root = Entrance(Point3(0,-10,0), dim=Point2(0,0), direction='back')", "for directory in sorted([d for d in os.listdir('mazes') if os.path.isdir(os.path.join('mazes',d))]):\n guess = os.path.join(os.getcwd(),os.path.join(os.path.join('mazes',directory),'maze.py'))\n if os.path.exists(guess):\n # Todo...
XXX101_r1 = MazeRoom(root, dim=Point3(50,50,50), offset=Point2(25,25), music='mazes/XXX101/basic.ogg') self.mazeAreas.append(XXX101_r1)
[ [ 14, 0, 0.5, 0.5, 0, 0.66, 0, 50, 3, 4, 0, 0, 65, 10, 3 ], [ 8, 0, 1, 0.5, 0, 0.66, 1, 243, 3, 1, 0, 0, 0, 0, 1 ] ]
[ "XXX101_r1 = MazeRoom(root, dim=Point3(50,50,50), offset=Point2(25,25), music='mazes/XXX101/basic.ogg')", "self.mazeAreas.append(XXX101_r1)" ]
""" FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.org/licenses/gpl.html...
[ [ 8, 0, 0.0719, 0.1375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.15, 0.0063, 0, 0.66, 0.1667, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.1562, 0.0063, 0, 0.66, ...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi", "import os", "import re", "import string", "def escape(text,...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
[ [ 1, 0, 0.0127, 0.0127, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0506, 0.0127, 0, 0...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 8, 0, 0.1176, 0.1933, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 8, 0, 0.1667, 0.2778, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.3111, 0.0111, 0, 0.66, 0.1429, 934, 0, 2, 0, 0, 934, 0, 0 ], [ 1, 0, 0.3333, 0.0111, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "import cgi, os", "from fckutil import *", "from fckcommands import * \t# defa...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
[ [ 1, 0, 0.0127, 0.0127, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.038, 0.0127, 0, 0.66, 0.1667, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0506, 0.0127, 0, 0...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckoutput import * \t# base http, xml and html output mixins", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorConnector(\tF...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 8, 0, 0.1176, 0.1933, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2269, 0.0084, 0, 0.66, 0.1429, 654, 0, 2, 0, 0, 654, 0, 0 ], [ 1, 0, 0.2353, 0.0084, 0, 0.66...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from time import gmtime, strftime", "import string", "def escape(text, replac...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
[ [ 8, 0, 0.2586, 0.431, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0172, 0, 0.66, 0.2, 385, 0, 1, 0, 0, 385, 0, 0 ], [ 1, 0, 0.5172, 0.0172, 0, 0.66, 0...
[ "\"\"\"\nFCKeditor - The text editor for Internet - http://www.fckeditor.net\nCopyright (C) 2003-2009 Frederico Caldeira Knabben\n\n== BEGIN LICENSE ==\n\nLicensed under the terms of any of the following licenses at your\nchoice:", "from connector import FCKeditorConnector", "from upload import FCKeditorQuickUp...
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gnu.or...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0638, 0.0213, 0, 0.66, 0.2, 630, 0, 1, 0, 0, 630, 0, 0 ], [ 1, 0, 0.0851, 0.0213, 0, 0.6...
[ "import os", "from fckutil import *", "from fckcommands import * \t# default command's implementation", "from fckconnector import FCKeditorConnectorBase # import base connector", "import config as Config", "class FCKeditorQuickUpload(\tFCKeditorConnectorBase,\n\t\t\t\t\t\t\tUploadFileCommandMixin,\n\t\t\t...
#!/usr/bin/env python # encoding: utf-8 import random """ ' Author: Jonathan Potter ' ' Name: parameters ' ' Description: The simulation parameters, or knobs. These can be changed by the user to tailor the ' simulation to his needs. These are described more in depth in the User's Manual of the documentation. ' ' ...
[ [ 1, 0, 0.1081, 0.027, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 8, 0, 0.4324, 0.5135, 0, 0.66, 0.5, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.8243, 0.2703, 0, 0.66, ...
[ "import random", "\"\"\"\n' Author: Jonathan Potter\n'\n' Name: parameters\n'\n' Description: The simulation parameters, or knobs. These can be changed by the user to tailor the\n' simulation to his needs. These are described more in depth in the User's Manual of the documentation.\n'", "parameters = {\n\t'it...
#!/usr/bin/env python # encoding: utf-8 import sys import os from parameters import * from driver import Driver """ ' ' Author: Jonathan Potter ' ' Name: Simulation ' ' Description: The main simulation entry point. This is the file you run, and it simply ' passes off control to the driver. ' ' Return: None. ' """ d...
[ [ 1, 0, 0.1379, 0.0345, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1724, 0.0345, 0, 0.66, 0.1667, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2414, 0.0345, 0, ...
[ "import sys", "import os", "from parameters import *", "from driver import Driver", "\"\"\"\n'\n' Author: Jonathan Potter\n'\n' Name: Simulation\n'\n' Description: The main simulation entry point. This is the file you run, and it simply\n' passes off control to the driver.", "def main():\n\td = Driver(pa...
#!/usr/bin/env python # encoding: utf-8 import networkx as nx import matplotlib.pyplot as plt import sys import os import random import math from protocols import Simple from protocols import Crowds from protocols import OnionRouting from protocols import Utilities """ ' ' Author: Jonathan Potter ' ' Name: Driver ...
[ [ 1, 0, 0.0125, 0.0031, 0, 0.66, 0, 691, 0, 1, 0, 0, 691, 0, 0 ], [ 1, 0, 0.0156, 0.0031, 0, 0.66, 0.0909, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 1, 0, 0.0219, 0.0031, 0, ...
[ "import networkx as nx", "import matplotlib.pyplot as plt", "import sys", "import os", "import random", "import math", "from protocols import Simple", "from protocols import Crowds", "from protocols import OnionRouting", "from protocols import Utilities", "\"\"\"\n'\n' Author: Jonathan Potter\n'...
#!/opt/local/Library/Frameworks/Python.framework/Versions/2.7/bin/python import codecs import re import jinja2 import markdown def process_slides(): with codecs.open('../presentation.html', 'w', encoding='utf8') as outfile: md = codecs.open('slides.md', encoding='utf8').read() md_slides = md.split('\n---\n')...
[ [ 1, 0, 0.0377, 0.0189, 0, 0.66, 0, 220, 0, 1, 0, 0, 220, 0, 0 ], [ 1, 0, 0.0566, 0.0189, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0755, 0.0189, 0, ...
[ "import codecs", "import re", "import jinja2", "import markdown", "def process_slides():\n with codecs.open('../presentation.html', 'w', encoding='utf8') as outfile:\n md = codecs.open('slides.md', encoding='utf8').read()\n md_slides = md.split('\\n---\\n')\n print(len(md_slides))\n\n slides = ...
#!/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 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...
#!/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 os import subprocess import sys BASEDIR = '../main/src/com/joelapenna/foursquare' TYPESDIR = '../captures/types/v1' captures = sys.argv[1:] if not captures: captures = os.listdir(TYPESDIR) for f in captures: basename = f.split('.')[0] javaname = ''.join([c.capitalize() for c in basena...
[ [ 1, 0, 0.1111, 0.037, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.1481, 0.037, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1852, 0.037, 0, 0.6...
[ "import os", "import subprocess", "import sys", "BASEDIR = '../main/src/com/joelapenna/foursquare'", "TYPESDIR = '../captures/types/v1'", "captures = sys.argv[1:]", "if not captures:\n captures = os.listdir(TYPESDIR)", " captures = os.listdir(TYPESDIR)", "for f in captures:\n basename = f.split('...
#!/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...
#coding=utf-8 from django.db import models from django.contrib.auth.models import User #记录订单的表,请根据自己需求完成 class Transaction(models.Model): out_trade_no=models.CharField(max_length=32) user=models.ForeignKey(User)
[ [ 1, 0, 0.25, 0.125, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.375, 0.125, 0, 0.66, 0.5, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 3, 0, 0.875, 0.375, 0, 0.66, 1,...
[ "from django.db import models", "from django.contrib.auth.models import User", "class Transaction(models.Model):\n out_trade_no=models.CharField(max_length=32)\n user=models.ForeignKey(User)", " out_trade_no=models.CharField(max_length=32)", " user=models.ForeignKey(User)" ]
#encoding=utf-8 from django.conf.urls.defaults import patterns,include,url from views import * urlpatterns=patterns('alipay.views', url(r'checkout$',alipayTo), url(r'alipay_notify$',alipay_notify), url(r'alipay_return$',alipay_return), )
[ [ 1, 0, 0.3, 0.1, 0, 0.66, 0, 341, 0, 3, 0, 0, 341, 0, 0 ], [ 1, 0, 0.4, 0.1, 0, 0.66, 0.5, 547, 0, 1, 0, 0, 547, 0, 0 ], [ 14, 0, 0.8, 0.5, 0, 0.66, 1, 990...
[ "from django.conf.urls.defaults import patterns,include,url", "from views import *", "urlpatterns=patterns('alipay.views',\n url(r'checkout$',alipayTo),\n url(r'alipay_notify$',alipay_notify),\n url(r'alipay_return$',alipay_return),\n )" ]
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: views.py # Desc: 支付宝接口调用类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-11-21 13:52:52 #==========================================...
[ [ 8, 0, 0.0355, 0.0533, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0651, 0.0059, 0, 0.66, 0.0909, 779, 0, 2, 0, 0, 779, 0, 0 ], [ 1, 0, 0.071, 0.0059, 0, 0.66,...
[ "'''\n#=============================================================================\n# FileName: views.py\n# Desc: 支付宝接口调用类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-11-21 13:52:52\n#============================================================================...
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: AlipayConfig.py # Desc: 基础配置类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-11-21 13:53:39 #======================================...
[ [ 8, 0, 0.1875, 0.2812, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.6875, 0.6562, 0, 0.66, 1, 979, 0, 1, 0, 0, 0, 0, 0 ], [ 2, 1, 0.7031, 0.625, 1, 0.99, 0,...
[ "'''\n#=============================================================================\n# FileName: AlipayConfig.py\n# Desc: 基础配置类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-11-21 13:53:39\n#========================================================================...
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: AlipayNotify.py # Desc: 支付宝通知处理类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-09-27 00:52:09 #===================================...
[ [ 8, 0, 0.0577, 0.0865, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1154, 0.0096, 0, 0.66, 0.25, 599, 0, 1, 0, 0, 599, 0, 0 ], [ 1, 0, 0.125, 0.0096, 0, 0.66, ...
[ "'''\n#=============================================================================\n# FileName: AlipayNotify.py\n# Desc: 支付宝通知处理类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-09-27 00:52:09\n#=====================================================================...
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: AlipaySubmit.py # Desc: 支付宝各接口请求提交类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-09-24 14:20:35 #================================...
[ [ 8, 0, 0.0349, 0.0523, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.064, 0.0058, 0, 0.66, 0.25, 599, 0, 1, 0, 0, 599, 0, 0 ], [ 1, 0, 0.0698, 0.0058, 0, 0.66, ...
[ "'''\n#=============================================================================\n# FileName: AlipaySubmit.py\n# Desc: 支付宝各接口请求提交类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-09-24 14:20:35\n#==================================================================...
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: AlipayService.py # Desc: 支付宝接口构造类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-09-24 01:47:10 #==================================...
[ [ 8, 0, 0.0645, 0.0968, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1183, 0.0108, 0, 0.66, 0.3333, 599, 0, 1, 0, 0, 599, 0, 0 ], [ 1, 0, 0.129, 0.0108, 0, 0.66,...
[ "'''\n#=============================================================================\n# FileName: AlipayService.py\n# Desc: 支付宝接口构造类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-09-24 01:47:10\n#====================================================================...
#!/usr/bin/env python #coding=utf-8 ''' #============================================================================= # FileName: AlipayCore.py # Desc: 支付宝接口共用函数类 # Author: GitFree # Email: pengzhao.lh@gmail.com # LastChange: 2011-09-24 03:32:13 #===================================...
[ [ 8, 0, 0.0674, 0.1011, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1348, 0.0112, 0, 0.66, 0.3333, 154, 0, 1, 0, 0, 154, 0, 0 ], [ 1, 0, 0.1461, 0.0112, 0, 0.66...
[ "'''\n#=============================================================================\n# FileName: AlipayCore.py\n# Desc: 支付宝接口共用函数类\n# Author: GitFree\n# Email: pengzhao.lh@gmail.com\n# LastChange: 2011-09-24 03:32:13\n#=====================================================================...
import os numInput = 0 numOutput = 0 folderName = raw_input("Enter the folder containing the data files to convert ... ") files = os.listdir(folderName) for each in files: if(os.path.isdir(each)): files.remove(each) fileStr = "" for eachFile in files: fileStr += eachFile + ", " print("Conver...
[ [ 1, 0, 0.0189, 0.0189, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0566, 0.0189, 0, 0.66, 0.1, 317, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0755, 0.0189, 0, 0.6...
[ "import os", "numInput = 0", "numOutput = 0", "folderName = raw_input(\"Enter the folder containing the data files to convert ... \")", "files = os.listdir(folderName)", "for each in files:\n\tif(os.path.isdir(each)):\n\t\tfiles.remove(each)", "\tif(os.path.isdir(each)):\n\t\tfiles.remove(each)", "\t\...