code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
__version__ = "1.0c2"
[ [ 14, 0, 1, 1, 0, 0.66, 0, 162, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "__version__ = \"1.0c2\"" ]
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.1205, 0.1452, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2046, 0.0033, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2112, 0.0033, 0, 0.66, ...
[ "\"\"\"Schema processing for discovery based APIs\n\nSchemas holds an APIs discovery schemas. It can return those schema as\ndeserialized JSON objects, or pretty print them as prototype objects that\nconform to the schema.\n\nFor example, given the schema:", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", ...
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
[ [ 8, 0, 0.5312, 0.1562, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.6562, 0.0312, 0, 0.66, 0.5, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 7, 0, 0.875, 0.2812, 0, 0.66, ...
[ "\"\"\"Utility module to import a JSON module\n\nHides all the messy details of exactly where\nwe get a simplejson module from.\n\"\"\"", "__author__ = 'jcgregorio@google.com (Joe Gregorio)'", "try: # pragma: no cover\n import simplejson\nexcept ImportError: # pragma: no cover\n try:\n # Try to import from...
# Early, and incomplete implementation of -04. # import re import urllib RESERVED = ":/?#[]@!$&'()*+,;=" OPERATOR = "+./;?|!@" EXPLODE = "*+" MODIFIER = ":^" TEMPLATE = re.compile(r"{(?P<operator>[\+\./;\?|!@])?(?P<varlist>[^}]+)}", re.UNICODE) VAR = re.compile(r"^(?P<varname>[^=\+\*:\^]+)((?P<explode>[\+\*])|(?P<part...
[ [ 1, 0, 0.0204, 0.0068, 0, 0.66, 0, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0272, 0.0068, 0, 0.66, 0.0833, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0408, 0.0068, 0, ...
[ "import re", "import urllib", "RESERVED = \":/?#[]@!$&'()*+,;=\"", "OPERATOR = \"+./;?|!@\"", "EXPLODE = \"*+\"", "MODIFIER = \":^\"", "TEMPLATE = re.compile(r\"{(?P<operator>[\\+\\./;\\?|!@])?(?P<varlist>[^}]+)}\", re.UNICODE)", "VAR = re.compile(r\"^(?P<varname>[^=\\+\\*:\\^]+)((?P<explode>[\\+\\*])...
#!/usr/bin/env python # Copyright (c) 2010, Google Inc. # 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 l...
[ [ 8, 0, 0.1818, 0.0267, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.2032, 0.0053, 0, 0.66, 0.2, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 3, 0, 0.2219, 0.0107, 0, 0.66, ...
[ "\"\"\"Module to enforce different constraints on flags.\n\nA validator represents an invariant, enforced over a one or more flags.\nSee 'FLAGS VALIDATORS' in gflags.py's docstring for a usage manual.\n\"\"\"", "__author__ = 'olexiy@google.com (Olexiy Oryeshko)'", "class Error(Exception):\n \"\"\"Thrown If val...
"""SocksiPy - Python SOCKS module. Version 1.00 Copyright 2006 Dan-Haim. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this ...
[ [ 8, 0, 0.0365, 0.0708, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 8, 0, 0.0845, 0.0205, 0, 0.66, 0.04, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0982, 0.0023, 0, 0.66, ...
[ "\"\"\"SocksiPy - Python SOCKS module.\nVersion 1.00\n\nCopyright 2006 Dan-Haim. All rights reserved.\n\nRedistribution and use in source and binary forms, with or without modification,\nare permitted provided that the following conditions are met:\n1. Redistributions of source code must retain the above copyright ...
""" iri2uri Converts an IRI to a URI. """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = [] __version__ = "1.0.0" __license__ = "MIT" __history__ = """ """ import urlparse # Convert an IRI to a URI following the rules in RFC 3987 # # The characte...
[ [ 8, 0, 0.0318, 0.0545, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0636, 0.0091, 0, 0.66, 0.0909, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.0727, 0.0091, 0, 0.66...
[ "\"\"\"\niri2uri\n\nConverts an IRI to a URI.\n\n\"\"\"", "__author__ = \"Joe Gregorio (joe@bitworking.org)\"", "__copyright__ = \"Copyright 2006, Joe Gregorio\"", "__contributors__ = []", "__version__ = \"1.0.0\"", "__license__ = \"MIT\"", "__history__ = \"\"\"\n\"\"\"", "import urlparse", "escape_...
#!/usr/bin/env python # # hanzim2dict # # Original version written by Michael Robinson (robinson@netrinsics.com) # Version 0.0.2 # Copyright 2004 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software...
[ [ 1, 0, 0.2273, 0.0091, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.2364, 0.0091, 0, 0.66, 0.0323, 220, 0, 2, 0, 0, 220, 0, 0 ], [ 1, 0, 0.2455, 0.0091, 0, ...
[ "from string import split", "from codecs import getdecoder, getencoder", "from struct import pack", "class Word:\n def __init__(self, code, definition):\n self.code = code\n self.definition = [definition]\n def add(self, definition):\n self.definition.append(definition)", " def...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys, os, string, re, glob import libxml2dom fencoding = 'utf-8' whattoextract = u'康熙字典' #def TextInNode(node): # result = u'' # for child in node.childNodes: # if child.nodeType == child.TEXT_NODE: # result += child.nodeValue # else: # result += TextInNode(child) ...
[ [ 1, 0, 0.5, 0.5, 0, 0.66, 0, 509, 0, 5, 0, 0, 509, 0, 0 ], [ 1, 0, 1, 0.5, 0, 0.66, 1, 623, 0, 1, 0, 0, 623, 0, 0 ] ]
[ "import sys, os, string, re, glob", "import libxml2dom" ]
import sys, string for line in sys.stdin.readlines(): words = string.split(line[:-1], '\t') muci = words[1] sheng = words[2] deng = words[3] hu = words[4] yunbu = words[5] diao = words[6] fanqie= words[7] she = words[8] chars = words[9] romazi= words[10] beizhu= words[12] pinyin= word...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 6, 0, 0.55, 0.95, 0, 0.66, 1, 373, 3, 0, 0, 0, 0, 0, 4 ], [ 14, 1, 0.15, 0.05, 1, 0.54, 0, 3...
[ "import sys, string", "for line in sys.stdin.readlines():\n\twords = string.split(line[:-1], '\\t')\n\tmuci = words[1]\n\tsheng = words[2]\n\tdeng = words[3]\n\thu = words[4]\n\tyunbu = words[5]\n\tdiao = words[6]", "\twords = string.split(line[:-1], '\\t')", "\tmuci = words[1]", "\tsheng = words[2]"...
# This tool convert KangXiZiDian djvu files to tiff files. # Download djvu files: http://bbs.dartmouth.edu/~fangq/KangXi/KangXi.tar # Character page info: http://wenq.org/unihan/Unihan.txt as kIRGKangXi field. # Character seek position in Unihan.txt http://wenq.org/unihan/unihandata.txt # DjVuLibre package provides the...
[ [ 1, 0, 0.5, 0.0625, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 4, 0, 0.8125, 0.4375, 0, 0.66, 1, 0, 0, 0, 0, 0, 0, 0, 5 ], [ 8, 1, 0.6875, 0.0625, 1, 0.8, 0, ...
[ "import os", "if __name__ == \"__main__\":\n\tos.system(\"mkdir tif\")\n\tpages = range(1, 1683+1)\n\tfor i in pages:\n\t\tpage = str(i)\n\t\tprint(page)\n\t\tos.system(\"ddjvu -format=tiff -page=\"+ page + \" -scale=100 -quality=150 KangXiZiDian.djvu\"+ \" tif/\" + page + \".tif\")", "\tos.system(\"mkdir tif\"...
#!/usr/bin/env python # -*- coding: utf-8 -*- from gimpfu import * import os def prepare_image(image, visibleLayers, size, numColors = None): """prepare custom image image - image object to change size - size of the image in pixels visibleLayers - a list of layers that must be visible """ for layer in imag...
[ [ 1, 0, 0.0155, 0.0052, 0, 0.66, 0, 433, 0, 1, 0, 0, 433, 0, 0 ], [ 1, 0, 0.0206, 0.0052, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 2, 0, 0.0954, 0.134, 0, 0...
[ "from gimpfu import *", "import os", "def prepare_image(image, visibleLayers, size, numColors = None):\n \"\"\"prepare custom image\n image - image object to change\n size - size of the image in pixels\n visibleLayers - a list of layers that must be visible\n \"\"\"\n for layer in image.layers:\n if la...
#!/usr/bin/python # WinVNKey Hannom Database to Stardict dictionary source Conversion Tool # coded by wesnoth@ustc on 070804 # http://winvnkey.sourceforge.net import sys, os, string, types, pprint infileencoding = 'utf-16-le' outfileencoding = 'utf-8' def showhelp(): print "Usage: %s filename" % sys.argv[0] def isha...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 509, 0, 5, 0, 0, 509, 0, 0 ], [ 2, 0, 0.0806, 0.0645, 0, 0.66, 0.3333, 162, 0, 0, 0, 0, 0, 0, 1 ], [ 8, 1, 0.0968, 0.0323, 1, 0....
[ "import sys, os, string, types, pprint", "def showhelp():\n\tprint(\"Usage: %s filename\" % sys.argv[0])", "\tprint(\"Usage: %s filename\" % sys.argv[0])", "def ishantu(str):\n\tif len(str) > 0 and ord(str[0]) > 0x2e80:\n\t\treturn True\n\telse:\n\t\treturn False", "\tif len(str) > 0 and ord(str[0]) > 0x2e8...
#!/usr/bin/env python # # uyghur2dict # By Abdisalam (anatilim@gmail.com), inspired by Michael Robinson's hanzim2dict converter. # # Original version, hanzim2dict, written by Michael Robinson (robinson@netrinsics.com) # Version 0.0.2 # Copyright 2004 # # This program is free software; you can redistribute i...
[ [ 1, 0, 0.2907, 0.0116, 0, 0.66, 0, 890, 0, 1, 0, 0, 890, 0, 0 ], [ 1, 0, 0.3023, 0.0116, 0, 0.66, 0.037, 399, 0, 1, 0, 0, 399, 0, 0 ], [ 3, 0, 0.3547, 0.0698, 0, 0...
[ "from string import split", "from struct import pack", "class Word:\n def __init__(self, code, definition):\n self.code = code\n self.definition = [definition]\n def add(self, definition):\n self.definition.append(definition)", " def __init__(self, code, definition):\n sel...
import sys, string base = {} for line in sys.stdin.readlines(): words = string.split(line[:-1], '\t') if len(words) != 2: print "Error!" exit if base.has_key(words[0]): base[words[0]] += [words[1]] else: base[words[0]] = [words[1]] keys = base.keys() keys.sort() for key in keys: print key,'\t...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 509, 0, 2, 0, 0, 509, 0, 0 ], [ 14, 0, 0.1111, 0.0556, 0, 0.66, 0.2, 47, 0, 0, 0, 0, 0, 6, 0 ], [ 6, 0, 0.3889, 0.5, 0, 0.66, ...
[ "import sys, string", "base = {}", "for line in sys.stdin.readlines():\n\twords = string.split(line[:-1], '\\t')\n\tif len(words) != 2:\n\t\tprint(\"Error!\")\n\t\texit\n\tif base.has_key(words[0]):\n\t\tbase[words[0]] += [words[1]]\n\telse:", "\twords = string.split(line[:-1], '\\t')", "\tif len(words) != ...
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program...
[ [ 1, 0, 0.1027, 0.0054, 0, 0.66, 0, 594, 0, 4, 0, 0, 594, 0, 0 ], [ 1, 0, 0.1081, 0.0054, 0, 0.66, 0.0333, 281, 0, 1, 0, 0, 281, 0, 0 ], [ 8, 0, 0.1189, 0.0054, 0, ...
[ "import board, pygame, sys, os", "from engines import *", "pygame.init()", "scr_size = 550, 630", "bordercolour = 255, 200, 0", "screen = pygame.display.set_mode(scr_size)", "pygame.display.set_caption(\"4D TicTacToe\")", "paper = pygame.image.load(\"paper_v1.png\")", "X = pygame.image.load(\"X.png\...
#!/usr/bin/python class IllegalMove(Exception): pass size = 3 dim = 4 # try to keep it as flexible as possible! colours = {0: ' ', 1: 'X', -1: 'O'} board_size = size ** dim diag = [range(size), range(size-1,-1,-1)] strt = [[k,k,k] for k in range(size)] psbl = diag + strt # possibilities def convert(coord): ...
[ [ 3, 0, 0.0302, 0.0172, 0, 0.66, 0, 546, 0, 0, 0, 0, 645, 0, 0 ], [ 14, 0, 0.0517, 0.0086, 0, 0.66, 0.0667, 714, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0603, 0.0086, 0, ...
[ "class IllegalMove(Exception):\n pass", "size = 3", "dim = 4 # try to keep it as flexible as possible!", "colours = {0: ' ', 1: 'X', -1: 'O'}", "board_size = size ** dim", "diag = [range(size), range(size-1,-1,-1)]", "strt = [[k,k,k] for k in range(size)]", "psbl = diag + strt # possibilities", "...
#!/usr/bin/python import board from random import choice def rate_position_1(pos): """ Rate position based on score plus open rows """ open_for_X, open_for_O = pos.count_patterns() rating = 0 for k in range(board.size): rating += open_for_X[k] * 0.5 ** k rating -= open_for_O[k]...
[ [ 1, 0, 0.0337, 0.0112, 0, 0.66, 0, 594, 0, 1, 0, 0, 594, 0, 0 ], [ 1, 0, 0.0449, 0.0112, 0, 0.66, 0.1429, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 2, 0, 0.118, 0.1124, 0, 0...
[ "import board", "from random import choice", "def rate_position_1(pos):\n \"\"\" Rate position\n based on score plus open rows\n \"\"\"\n open_for_X, open_for_O = pos.count_patterns()\n rating = 0\n for k in range(board.size):\n rating += open_for_X[k] * 0.5 ** k", " \"\"\" Rate po...
#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program...
[ [ 1, 0, 0.0625, 0.0625, 0, 0.66, 0, 594, 0, 1, 0, 0, 594, 0, 0 ], [ 1, 0, 0.125, 0.0625, 0, 0.66, 0.5, 281, 0, 1, 0, 0, 281, 0, 0 ], [ 2, 0, 0.5938, 0.75, 0, 0.66, ...
[ "import board", "from engines import *", "def human_make_move():\n while True:\n try:\n coord_str = raw_input(\"Player \" + board.colours[pos.whose_turn]\n + \": Please choose your move! \")\n coord = [int(c) for c in coord_str]\n pos.move(board.convert...
from PIL import Image tileArray = [ [ [0, 0] ] ] #print tileArray[1][1][0] width = 128 height = 128 tileSize = 32 outputFileName = "map.png" tiles = Image.open('beachTiles.png') tilePix = tiles.load() tileMap = Image.new("RGBA", (width * tileSize, height * tileSize), "pink") mapPix = tileMap.load() #sandTile =...
[ [ 1, 0, 0.0357, 0.0357, 0, 0.66, 0, 556, 0, 1, 0, 0, 556, 0, 0 ], [ 14, 0, 0.1071, 0.0357, 0, 0.66, 0.0769, 692, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.25, 0.0357, 0, 0....
[ "from PIL import Image", "tileArray = [ [ [0, 0] ] ]", "width = 128", "height = 128", "tileSize = 32", "outputFileName = \"map.png\"", "tiles = Image.open('beachTiles.png')", "tilePix = tiles.load()", "tileMap = Image.new(\"RGBA\", (width * tileSize, height * tileSize), \"pink\")", "mapPix = tileM...
""" The MIT License Copyright (c) 2010 AppHacker apphacker@gmail.com Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, mod...
[ [ 8, 0, 0.1103, 0.2178, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2235, 0.0029, 0, 0.66, 0.0769, 345, 0, 1, 0, 0, 345, 0, 0 ], [ 1, 0, 0.2264, 0.0029, 0, 0.66...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2010 AppHacker apphacker@gmail.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights"...
#!/usr/bin/python # -*- coding: utf-8 -*- import math, sys, os.path, glob, string, re, os, subprocess is_windows = sys.platform == 'win32' is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AM...
[ [ 1, 0, 0.01, 0.0025, 0, 0.66, 0, 526, 0, 8, 0, 0, 526, 0, 0 ], [ 14, 0, 0.015, 0.0025, 0, 0.66, 0.01, 967, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0175, 0.0025, 0, 0.66,...
[ "import math, sys, os.path, glob, string, re, os, subprocess", "is_windows = sys.platform == 'win32'", "is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64'))", "is_linux = sys.platfo...
#!/usr/bin/python # -*- coding: utf-8 -*- import math, sys, os.path, glob, string, re, os, subprocess is_windows = sys.platform == 'win32' is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AM...
[ [ 1, 0, 0.01, 0.0025, 0, 0.66, 0, 526, 0, 8, 0, 0, 526, 0, 0 ], [ 14, 0, 0.015, 0.0025, 0, 0.66, 0.01, 967, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0175, 0.0025, 0, 0.66,...
[ "import math, sys, os.path, glob, string, re, os, subprocess", "is_windows = sys.platform == 'win32'", "is_win64 = is_windows and (os.environ['PROCESSOR_ARCHITECTURE'] == 'AMD64' or (os.environ.has_key('PROCESSOR_ARCHITEW6432') and os.environ['PROCESSOR_ARCHITEW6432'] == 'AMD64'))", "is_linux = sys.platfo...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/x64") zenilib.destroy("bin/x64") zenilib.destroy("lib_win/x64") zenilib.destroy("*_x64.exe") zenilib.destroy("...
[ [ 1, 0, 0.1429, 0.0476, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5476, 0.6667, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 9 ], [ 8, 1, 0.2857, 0.0476, 1, 0.1, ...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/x64\")\n zenilib.destroy(\"Visual Studio 2010/x64\")\n \n zenilib.destroy(\"bin/x64\")", " os.chdir( zenilib.dir )", " zenilib.auto_accept = True", " zenilib.des...
#!/usr/bin/python import glob, os, shutil, sys auto_accept = False dir = os.path.dirname( os.path.realpath( __file__ ) ) + "/.." def isspace(c): return c == ' ' or c == '\t' or c == '\r' or c == '\n' def yes_no_prompt(prompt): if auto_accept: return True print prompt + " [y/N] " , line = sys.stdin.re...
[ [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0, 958, 0, 4, 0, 0, 958, 0, 0 ], [ 14, 0, 0.1111, 0.0222, 0, 0.66, 0.1667, 697, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.1333, 0.0222, 0, ...
[ "import glob, os, shutil, sys", "auto_accept = False", "dir = os.path.dirname( os.path.realpath( __file__ ) ) + \"/..\"", "def isspace(c):\n return c == ' ' or c == '\\t' or c == '\\r' or c == '\\n'", " return c == ' ' or c == '\\t' or c == '\\r' or c == '\\n'", "def yes_no_prompt(prompt):\n if auto_ac...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64 def main(): zenilib_clean_extra.main() zenilib_strip_x64.main() os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("Frameworks") if __name__ == '__main__': main(*sys.argv[1:])
[ [ 1, 0, 0.2, 0.0667, 0, 0.66, 0, 688, 0, 5, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5667, 0.5333, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 4 ], [ 8, 1, 0.4, 0.0667, 1, 0.51, 0...
[ "import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64", "def main():\n zenilib_clean_extra.main()\n zenilib_strip_x64.main()\n \n os.chdir( zenilib.dir )\n zenilib.auto_accept = False\n \n zenilib.destroy(\"Frameworks\")", " zenilib_clean_extra.main()", " zenilib_strip_x64.main()", " os...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean def main(): zenilib_clean.main() os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/*.suo") zenilib.destroy("Visual Studio 2008/*.user", ["Application.vcproj.user", "Application_SoarSML.vcproj.user", "Launcher...
[ [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5357, 0.75, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 14 ], [ 8, 1, 0.2143, 0.0357, 1, 0.22, ...
[ "import os, sys, zenilib, zenilib_clean", "def main():\n zenilib_clean.main()\n \n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/*.suo\")\n zenilib.destroy(\"Visual Studio 2008/*.user\", [\"Application.vcproj.user\", \"Application_SoarSML.vcproj.user\", \"La...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/SoarLibrary") zenilib.destroy("Visual Studio 2008/Win32") zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/SoarLibrary") zenilib.de...
[ [ 1, 0, 0.0448, 0.0149, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5149, 0.8955, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 44 ], [ 8, 1, 0.0896, 0.0149, 1, 0.78...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/SoarLibrary\")\n zenilib.destroy(\"Visual Studio 2008/Win32\")\n zenilib.destroy(\"Visual Studio 2008/x64\")\n zenilib.destroy(\"Visual Studio 2010/SoarLibrary\")", " ...
#!/usr/bin/python import glob, os, shutil, sys auto_accept = False dir = os.path.dirname( os.path.realpath( __file__ ) ) + "/.." def isspace(c): return c == ' ' or c == '\t' or c == '\r' or c == '\n' def yes_no_prompt(prompt): if auto_accept: return True print prompt + " [y/N] " , line = sys.stdin.re...
[ [ 1, 0, 0.0667, 0.0222, 0, 0.66, 0, 958, 0, 4, 0, 0, 958, 0, 0 ], [ 14, 0, 0.1111, 0.0222, 0, 0.66, 0.1667, 697, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.1333, 0.0222, 0, ...
[ "import glob, os, shutil, sys", "auto_accept = False", "dir = os.path.dirname( os.path.realpath( __file__ ) ) + \"/..\"", "def isspace(c):\n return c == ' ' or c == '\\t' or c == '\\r' or c == '\\n'", " return c == ' ' or c == '\\t' or c == '\\r' or c == '\\n'", "def yes_no_prompt(prompt):\n if auto_ac...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean def main(): zenilib_clean.main() os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/*.suo") zenilib.destroy("Visual Studio 2008/*.user", ["Application.vcproj.user", "Application_SoarSML.vcproj.user", "Launcher...
[ [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5357, 0.75, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 14 ], [ 8, 1, 0.2143, 0.0357, 1, 0.6, ...
[ "import os, sys, zenilib, zenilib_clean", "def main():\n zenilib_clean.main()\n \n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/*.suo\")\n zenilib.destroy(\"Visual Studio 2008/*.user\", [\"Application.vcproj.user\", \"Application_SoarSML.vcproj.user\", \"La...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("bin/x64/cgc.exe") zenilib.destroy("bin/cgc.exe") zenilib.destroy("bin/cgfxcat.exe") zenilib.destroy("bin/cginfo.exe") zenilib.destroy("config/zenilib.xml.bak") zenilib.de...
[ [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5303, 0.7879, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 18 ], [ 8, 1, 0.1818, 0.0303, 1, 0.82...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = False\n \n zenilib.destroy(\"bin/x64/cgc.exe\")\n zenilib.destroy(\"bin/cgc.exe\")\n zenilib.destroy(\"bin/cgfxcat.exe\")\n zenilib.destroy(\"bin/cginfo.exe\")", " os.chdir( zenilib.dir )", " zenilib.auto_accept...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/SoarLibrary") zenilib.destroy("Visual Studio 2008/Win32") zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/SoarLibrary") zenilib.de...
[ [ 1, 0, 0.0448, 0.0149, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5149, 0.8955, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 44 ], [ 8, 1, 0.0896, 0.0149, 1, 0.02...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/SoarLibrary\")\n zenilib.destroy(\"Visual Studio 2008/Win32\")\n zenilib.destroy(\"Visual Studio 2008/x64\")\n zenilib.destroy(\"Visual Studio 2010/SoarLibrary\")", " ...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = True zenilib.destroy("Visual Studio 2008/x64") zenilib.destroy("Visual Studio 2010/x64") zenilib.destroy("bin/x64") zenilib.destroy("lib_win/x64") zenilib.destroy("*_x64.exe") zenilib.destroy("...
[ [ 1, 0, 0.1429, 0.0476, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5476, 0.6667, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 9 ], [ 8, 1, 0.2857, 0.0476, 1, 0.36,...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = True\n \n zenilib.destroy(\"Visual Studio 2008/x64\")\n zenilib.destroy(\"Visual Studio 2010/x64\")\n \n zenilib.destroy(\"bin/x64\")", " os.chdir( zenilib.dir )", " zenilib.auto_accept = True", " zenilib.des...
#!/usr/bin/python import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64 def main(): zenilib_clean_extra.main() zenilib_strip_x64.main() os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("Frameworks") if __name__ == '__main__': main(*sys.argv[1:])
[ [ 1, 0, 0.2, 0.0667, 0, 0.66, 0, 688, 0, 5, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5667, 0.5333, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 4 ], [ 8, 1, 0.4, 0.0667, 1, 0.43, 0...
[ "import os, sys, zenilib, zenilib_clean_extra, zenilib_strip_x64", "def main():\n zenilib_clean_extra.main()\n zenilib_strip_x64.main()\n \n os.chdir( zenilib.dir )\n zenilib.auto_accept = False\n \n zenilib.destroy(\"Frameworks\")", " zenilib_clean_extra.main()", " zenilib_strip_x64.main()", " os...
#!/usr/bin/python import os, sys, zenilib def main(): os.chdir( zenilib.dir ) zenilib.auto_accept = False zenilib.destroy("bin/x64/cgc.exe") zenilib.destroy("bin/cgc.exe") zenilib.destroy("bin/cgfxcat.exe") zenilib.destroy("bin/cginfo.exe") zenilib.destroy("config/zenilib.xml.bak") zenilib.de...
[ [ 1, 0, 0.0909, 0.0303, 0, 0.66, 0, 688, 0, 3, 0, 0, 688, 0, 0 ], [ 2, 0, 0.5303, 0.7879, 0, 0.66, 0.5, 624, 0, 0, 0, 0, 0, 0, 18 ], [ 8, 1, 0.1818, 0.0303, 1, 0.82...
[ "import os, sys, zenilib", "def main():\n os.chdir( zenilib.dir )\n zenilib.auto_accept = False\n \n zenilib.destroy(\"bin/x64/cgc.exe\")\n zenilib.destroy(\"bin/cgc.exe\")\n zenilib.destroy(\"bin/cgfxcat.exe\")\n zenilib.destroy(\"bin/cginfo.exe\")", " os.chdir( zenilib.dir )", " zenilib.auto_accept...
#!/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.63, ...
[ "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...
""" 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...
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
[ [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0976, 0.0244, 0, 0....
[ "import datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'house'\n db.create_table('house_house', (\n ('id', self.gf('django.db....
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
[ [ 1, 0, 0.0465, 0.0233, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0698, 0.0233, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.093, 0.0233, 0, 0.6...
[ "import datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'house'\n db.create_table('house_house', (\n ('id', self.gf('django.db....
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'house' db.create_table('house_house', ( ('id', self.gf('django.db....
[ [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, 0.66, 0.25, 545, 0, 1, 0, 0, 545, 0, 0 ], [ 1, 0, 0.0976, 0.0244, 0, 0....
[ "import datetime", "from south.db import db", "from south.v2 import SchemaMigration", "from django.db import models", "class Migration(SchemaMigration):\n\n def forwards(self, orm):\n \n # Adding model 'house'\n db.create_table('house_house', (\n ('id', self.gf('django.db....
# encoding=utf-8 from django.conf.urls.defaults import * from django.conf import settings from house import views urlpatterns=patterns('', url(r'^house/detail/(?P<id>\d+)/$', views.detail,{'template_name':'detail.html'}), url(r'^house/', views.index,{'template_name':'house.html'}), url(r'^contact...
[ [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66, 0.3333, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.3333, 0.0667, 0, 0.6...
[ "from django.conf.urls.defaults import *", "from django.conf import settings", "from house import views", "urlpatterns=patterns('',\n url(r'^house/detail/(?P<id>\\d+)/$', views.detail,{'template_name':'detail.html'}),\n url(r'^house/', views.index,{'template_name':'house.html'}),\n url(r'^contact/', ...
# encoding=utf-8 from django.contrib import admin from zhaofang.house.models import * admin.site.register(House) admin.site.register(Photo) class HouseAdmin(admin.ModelAdmin): formfield_overrides = { #fields=('name') #models.TextField: {'detail': RichTextEditor}, }
[ [ 1, 0, 0.1667, 0.0833, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.25, 0.0833, 0, 0.66, 0.25, 323, 0, 1, 0, 0, 323, 0, 0 ], [ 8, 0, 0.4167, 0.0833, 0, 0.66...
[ "from django.contrib import admin", "from zhaofang.house.models import *", "admin.site.register(House)", "admin.site.register(Photo)", "class HouseAdmin(admin.ModelAdmin):\n formfield_overrides = {\n #fields=('name')\n #models.TextField: {'detail': RichTextEditor},\n }", " formfield...
# encoding=utf-8 from house.models import * from django.shortcuts import render_to_response from django.template import RequestContext def index(request,template_name): house_list=House.objects.all().reverse()[:8] return render_to_response(template_name,locals(),context_instance=RequestContext(request...
[ [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.66, 0.1429, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.1818, 0.0455, 0, ...
[ "from house.models import *", "from django.shortcuts import render_to_response", "from django.template import RequestContext", "def index(request,template_name):\n house_list=House.objects.all().reverse()[:8] \n return render_to_response(template_name,locals(),context_instance=RequestContext(request))",...
#!/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.76, ...
[ "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 * from django.contrib import admin from django.conf import settings # Uncomment the next two lines to enable the admin: # from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Example: # (r'^zhaofang/', include('zhaofang.foo.urls')),...
[ [ 1, 0, 0.0323, 0.0323, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.0645, 0.0323, 0, 0.66, 0.2, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.0968, 0.0323, 0, 0.6...
[ "from django.conf.urls.defaults import *", "from django.contrib import admin", "from django.conf import settings", "admin.autodiscover()", "urlpatterns = patterns('',\n # Example:\n # (r'^zhaofang/', include('zhaofang.foo.urls')),\n (r'^statics/(?P<path>.*)$','django.views.static.serve',{'document_...
# Django settings for zhaofang project. # -*- coding: utf-8 -*- import os gettext = lambda s: s PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { ...
[ [ 1, 0, 0.0192, 0.0064, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.0256, 0.0064, 0, 0.66, 0.0357, 723, 9, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0321, 0.0064, 0, ...
[ "import os", "gettext = lambda s: s", "PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))", "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@domain.com'),\n)", "MANAGERS = ADMINS", "DATABASES = {\n 'default': {\n 'ENGINE': 'mysql', # Add 'postgres...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nsgwsl.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"nsgwsl.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"nsgwsl....
from django.db import models # Create your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ] ]
[ "from django.db import models" ]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
[ [ 8, 0, 0.2188, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0625, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.8438, 0.375, 0, 0.66, 1,...
[ "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\...
# Create your views here. from django.shortcuts import render_to_response from django.shortcuts import redirect from django.core.context_processors import csrf def badpasswords(request): content = {} content.update(csrf(request)) if request.method == 'POST': if str(request.POST['pass']...
[ [ 1, 0, 0.0105, 0.0053, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0158, 0.0053, 0, 0.66, 0.0769, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0211, 0.0053, 0, ...
[ "from django.shortcuts import render_to_response", "from django.shortcuts import redirect", "from django.core.context_processors import csrf", "def badpasswords(request):\n\n content = {}\n content.update(csrf(request))\n\n if request.method == 'POST':\n if str(request.POST['pass']).lower() ==...
from django.db import models # Create your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ] ]
[ "from django.db import models" ]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests 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. from django.shortcuts import render_to_response from django.shortcuts import redirect from django.core.context_processors import csrf import time import random import urllib def unprotected(request): content = {} return render_to_response("Lab7/unprotected.html", content) def unprote...
[ [ 1, 0, 0.037, 0.0185, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0556, 0.0185, 0, 0.66, 0.0909, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0741, 0.0185, 0, 0...
[ "from django.shortcuts import render_to_response", "from django.shortcuts import redirect", "from django.core.context_processors import csrf", "import time", "import random", "import urllib", "def unprotected(request):\n content = {}\n return render_to_response(\"Lab7/unprotected.html\", content)"...
from django.db import models # Create your models here.
[ [ 1, 0, 0.3333, 0.3333, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ] ]
[ "from django.db import models" ]
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
[ [ 8, 0, 0.2188, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0625, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.8438, 0.375, 0, 0.66, 1,...
[ "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\...
from django.template import RequestContext from django.shortcuts import render_to_response from django.core.context_processors import csrf from django.http import HttpResponse def index(request): c = {} c.update(csrf(request)) if request.method == 'POST': data = { 'price' : ...
[ [ 1, 0, 0.0217, 0.0217, 0, 0.66, 0, 213, 0, 1, 0, 0, 213, 0, 0 ], [ 1, 0, 0.0435, 0.0217, 0, 0.66, 0.2, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0652, 0.0217, 0, 0.6...
[ "from django.template import RequestContext", "from django.shortcuts import render_to_response", "from django.core.context_processors import csrf", "from django.http import HttpResponse", "def index(request):\n c = {}\n c.update(csrf(request))\n\n if request.method == 'POST':\n data = {\n ...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns('', # Examples: url(r'^$', 'nsgwsl.views.index'), # url(r'^nsgwsl/', include('nsgwsl.foo.urls')), url(r'^La...
[ [ 1, 0, 0.0217, 0.0217, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 14, 0, 0.5761, 0.8696, 0, 0.66, 1, 990, 3, 25, 0, 0, 75, 10, 25 ] ]
[ "from django.conf.urls import patterns, include, url", "urlpatterns = patterns('',\n # Examples:\n url(r'^$', 'nsgwsl.views.index'),\n # url(r'^nsgwsl/', include('nsgwsl.foo.urls')),\n url(r'^Lab4/', 'Lab4.views.index'),\n url(r'^Lab4-get/', 'Lab4.views.get'),\n\n # This for Lab 5" ]
# Django settings for ITP425 project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'N...
[ [ 14, 0, 0.0195, 0.0065, 0, 0.66, 0, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.026, 0.0065, 0, 0.66, 0.0417, 7, 2, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0455, 0.0195, 0, 0.66...
[ "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)", "MANAGERS = ADMINS", "DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n 'NAME': 'database/db.sqlite'...
from django.shortcuts import render_to_response def index(request): return render_to_response('index.html')
[ [ 1, 0, 0.25, 0.25, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 2, 0, 0.875, 0.5, 0, 0.66, 1, 780, 0, 1, 1, 0, 0, 0, 1 ], [ 13, 1, 1, 0.25, 1, 0.19, 0, 0, ...
[ "from django.shortcuts import render_to_response", "def index(request):\n return render_to_response('index.html')", " return render_to_response('index.html')" ]
""" WSGI config for ITP425 project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATI...
[ [ 8, 0, 0.2857, 0.5357, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5714, 0.0357, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.6429, 0.0357, 0, 0.66, ...
[ "\"\"\"\nWSGI config for ITP425 project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``runserver`` and ``runfcgi`` commands discover\nthis application via the ``WSGI_A...
from django.db import models # Create your models here. from django.db.models import Model class Session(models.Model): sessionindex = models.IntegerField(default=1234567) def __unicode__(self): return str(self.sessionindex)
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.4, 0.1, 0, 0.66, 0.5, 680, 0, 1, 0, 0, 680, 0, 0 ], [ 3, 0, 0.8, 0.5, 0, 0.66, 1, 712, ...
[ "from django.db import models", "from django.db.models import Model", "class Session(models.Model):\n sessionindex = models.IntegerField(default=1234567)\n\n def __unicode__(self):\n return str(self.sessionindex)", " sessionindex = models.IntegerField(default=1234567)", " def __unicod...
""" This file demonstrates writing tests using the unittest module. These will pass when you run "manage.py test". Replace this with more appropriate tests for your application. """ from django.test import TestCase class SimpleTest(TestCase): def test_basic_addition(self): """ Tests...
[ [ 8, 0, 0.2188, 0.375, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5, 0.0625, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.8438, 0.375, 0, 0.66, 1,...
[ "\"\"\"\nThis file demonstrates writing tests using the unittest module. These will pass\nwhen you run \"manage.py test\".\n\nReplace this with more appropriate tests for your application.\n\"\"\"", "from django.test import TestCase", "class SimpleTest(TestCase):\n def test_basic_addition(self):\n \"\...
# Create your views here. from django.shortcuts import render_to_response from django.shortcuts import redirect import time import random import urllib def weaktoken1(request): content = {} if request.method == "POST": if str(request.POST['user']) == 'Lassie' and str(request.POST['pass']) =...
[ [ 1, 0, 0.0267, 0.0133, 0, 0.66, 0, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.04, 0.0133, 0, 0.66, 0.125, 852, 0, 1, 0, 0, 852, 0, 0 ], [ 1, 0, 0.0533, 0.0133, 0, 0.6...
[ "from django.shortcuts import render_to_response", "from django.shortcuts import redirect", "import time", "import random", "import urllib", "def weaktoken1(request):\n content = {}\n\n if request.method == \"POST\":\n if str(request.POST['user']) == 'Lassie' and str(request.POST['pass']) == ...
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
[ [ 8, 0, 0.1875, 0.0081, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1976, 0.004, 0, 0.66, 0.0833, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2056, 0.004, 0, 0.66, ...
[ "\"\"\"Google Code file uploader script.\n\"\"\"", "__author__ = 'danderson@google.com (David Anderson)'", "import httplib", "import os.path", "import optparse", "import getpass", "import base64", "import sys", "def upload(file, project_name, user_name, password, summary, labels=None):\n \"\"\"Uplo...
#!/usr/bin/env python # # Copyright 2006, 2007 Google Inc. All Rights Reserved. # Author: danderson@google.com (David Anderson) # # Script for uploading files to a Google Code project. # # This is intended to be both a useful script for people who want to # streamline project uploads and a reference implementation for ...
[ [ 8, 0, 0.1875, 0.0081, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1976, 0.004, 0, 0.66, 0.0833, 777, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.2056, 0.004, 0, 0.66, ...
[ "\"\"\"Google Code file uploader script.\n\"\"\"", "__author__ = 'danderson@google.com (David Anderson)'", "import httplib", "import os.path", "import optparse", "import getpass", "import base64", "import sys", "def upload(file, project_name, user_name, password, summary, labels=None):\n \"\"\"Uplo...
# Copyright 2010 Google Inc. All Rights Reserved. # # Licensed under the terms of the Apache Software License 2.0: # http://www.apache.org/licenses/LICENSE-2.0 # # Questions, comments, feature requests and patches are most welcome. # Please direct all of these to the Google Code users group: # http://groups.google.co...
[ [ 8, 0, 0.1709, 0.1795, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2906, 0.0085, 0, 0.66, 0.125, 901, 0, 1, 0, 0, 901, 0, 0 ], [ 1, 0, 0.2991, 0.0085, 0, 0.66,...
[ "'''distutils command class for uploading to Google Code\n\nAdd this command to your setup.py script for automatic uploading of\nsource and Windows binary distributions. For example:\n\ntry:\n from googlecode_distutils_upload import upload\nexcept ImportError:", "import distutils", "import distutils.command.b...
import os from google.appengine.ext.webapp import template import cgi from google.appengine.ext.webapp.util import login_required from google.appengine.api import users from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app from google.appengine.ext import db from goog...
[ [ 1, 0, 0.0156, 0.0156, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0312, 0.0156, 0, 0.66, 0.0714, 8, 0, 1, 0, 0, 8, 0, 0 ], [ 1, 0, 0.0469, 0.0156, 0, 0.66...
[ "import os", "from google.appengine.ext.webapp import template", "import cgi", "from google.appengine.ext.webapp.util import login_required", "from google.appengine.api import users", "from google.appengine.ext import webapp", "from google.appengine.ext.webapp.util import run_wsgi_app", "from google.a...
SECRET_CODE = 'whateveryourcodeis'
[ [ 14, 0, 1, 0.5, 0, 0.66, 0, 52, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "SECRET_CODE = 'whateveryourcodeis'" ]
import sys, os, optparse, subprocess # Avoid .pyc files sys.dont_write_bytecode = True # Auxilary def toPosix(path): if os.sep != "/" and os.sep in path: return path.replace(os.sep, "/") return path # Parse command line parser = optparse.OptionParser(usage='usage: %prog [options] settings...
[ [ 1, 0, 0.0119, 0.0119, 0, 0.66, 0, 509, 0, 4, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0476, 0.0119, 0, 0.66, 0.0333, 236, 1, 0, 0, 0, 0, 4, 0 ], [ 2, 0, 0.1012, 0.0476, 0, 0...
[ "import sys, os, optparse, subprocess", "sys.dont_write_bytecode = True", "def toPosix(path):\n if os.sep != \"/\" and os.sep in path:\n return path.replace(os.sep, \"/\")\n return path", " if os.sep != \"/\" and os.sep in path:\n return path.replace(os.sep, \"/\")", " return p...
#!/usr/bin/env pypy import os, sys, logging, re import argparse import fnmatch configurations = {'lite', 'pro'} package_dirs = { 'lite': ('src/cx/hell/android/pdfview',), 'pro': ('src/cx/hell/android/pdfviewpro',) } file_replaces = { 'lite': ( 'cx.hell.android.pdfview.', '"cx.hell.an...
[ [ 1, 0, 0.014, 0.0047, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0187, 0.0047, 0, 0.66, 0.0526, 325, 0, 1, 0, 0, 325, 0, 0 ], [ 1, 0, 0.0234, 0.0047, 0, 0...
[ "import os, sys, logging, re", "import argparse", "import fnmatch", "configurations = {'lite', 'pro'}", "package_dirs = {\n 'lite': ('src/cx/hell/android/pdfview',),\n 'pro': ('src/cx/hell/android/pdfviewpro',)\n}", "file_replaces = {\n 'lite': (\n 'cx.hell.android.pdfview.',\n '\"c...
#This contains global definition of Browser class and other useful thing ####################################################################################### # # # File: browser_bogus.py ...
[ [ 1, 0, 0.7442, 0.0233, 0, 0.66, 0, 345, 0, 1, 0, 0, 345, 0, 0 ], [ 1, 0, 0.7674, 0.0233, 0, 0.66, 0.5, 591, 0, 1, 0, 0, 591, 0, 0 ], [ 3, 0, 0.907, 0.2093, 0, 0.66...
[ "import urllib2", "import cookielib", "class Browser():\n def __init__(self, user, passwd, user_agent=\"Python-urllib/2.7\"):\n self.username = user\n self.password = passwd\n self.user_agent = user_agent\n self.cookie = cookielib.CookieJar()\n self.urlOpener = urllib2.buil...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
[ [ 1, 0, 0.1724, 0.0345, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.2069, 0.0345, 0, 0.66, 0.2, 768, 0, 1, 0, 0, 768, 0, 0 ], [ 1, 0, 0.2414, 0.0345, 0, 0.6...
[ "from distutils.core import setup", "import py2exe", "import main", "from glob import glob", "data_files = [(\"Microsoft.VC100.CRT\", \n glob(r'E:\\important\\应用软件\\开发工具\\python\\开发代码\\Microsoft.VC100.CRT\\*.*'))]", "setup(\n options = {\"py2exe\": {\"optimize\": 2,\n ...
# -*- coding: utf-8 -*- #! /usr/bin/python ####################################################################################### # # # File: main.py # # Par...
[ [ 8, 0, 0.1699, 0.034, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1893, 0.0049, 0, 0.66, 0.0435, 654, 0, 3, 0, 0, 654, 0, 0 ], [ 1, 0, 0.1942, 0.0049, 0, 0.66,...
[ "'''\nCreated on May 14, 2011\nModified on Apr 28, 2013\n\n@author: flyxian\n@modified by: elsesky\n'''", "import time, datetime, sys", "import random", "import sqlite3", "import urllib2", "from PyQt4.QtCore import *", "from PyQt4.QtGui import *", "from ui.Core import *", "import browser_bogus", "...
import random NS_NTP = ["132.163.4.101", "132.163.4.102", "132.163.4.103", "128.138.140.44", "69.25.96.13", "64.236.96.53"] #print len(UA_MSIE10) #print len(UA_MSIE9) #print len(UA_MSIE8) #print len(UA_MSIE7) #print len(UA_MSIE6) def get_random_ntp_server(): random.seed() i = random.randra...
[ [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.2708, 0.25, 0, 0.66, 0.3333, 91, 0, 0, 0, 0, 0, 5, 0 ], [ 2, 0, 0.7708, 0.1667, 0, 0.66...
[ "import random", "NS_NTP = [\"132.163.4.101\",\n\"132.163.4.102\",\n\"132.163.4.103\",\n\"128.138.140.44\",\n\"69.25.96.13\",\n\"64.236.96.53\"]", "def get_random_ntp_server():\n random.seed()\n i = random.randrange(0, len(NS_NTP) - 1)\n return NS_NTP[i]", " random.seed()", " i = random.randr...
#! /usr/bin/python # -*- coding: utf-8 -*- from distutils.core import setup import py2exe import main from glob import glob data_files = [("Microsoft.VC100.CRT", glob(r'E:\important\应用软件\开发工具\python\开发代码\Microsoft.VC100.CRT\*.*'))] setup( options = {"py2exe": {"optimize": 2, ...
[ [ 1, 0, 0.1724, 0.0345, 0, 0.66, 0, 152, 0, 1, 0, 0, 152, 0, 0 ], [ 1, 0, 0.2069, 0.0345, 0, 0.66, 0.2, 768, 0, 1, 0, 0, 768, 0, 0 ], [ 1, 0, 0.2414, 0.0345, 0, 0.6...
[ "from distutils.core import setup", "import py2exe", "import main", "from glob import glob", "data_files = [(\"Microsoft.VC100.CRT\", \n glob(r'E:\\important\\应用软件\\开发工具\\python\\开发代码\\Microsoft.VC100.CRT\\*.*'))]", "setup(\n options = {\"py2exe\": {\"optimize\": 2,\n ...
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() time_server = (get_random_ntp_server(), 123) TIME1970 = 2208988800L # Thanks to F.Lundh def get_ntp_time(): client = socket( AF_INET, SOC...
[ [ 1, 0, 0.0714, 0.0357, 0, 0.66, 0, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0.25, 399, 0, 4, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1786, 0.0357, 0, 0....
[ "from socket import *", "import struct,os,time,sys", "from ntp_server_lib import get_random_ntp_server", "time_server = (get_random_ntp_server(), 123)", "def get_ntp_time():\n client = socket( AF_INET, SOCK_DGRAM ) \n data = '\\x1b' + 47 * '\\0' \n client.sendto(data, time_server)\n try:\n ...
# -*- coding: utf-8 -*- ####################################################################################### # # # File: Core.py # # Part of stage1st_cheater ...
[ [ 8, 0, 0.1209, 0.0183, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1319, 0.0037, 0, 0.66, 0.125, 616, 0, 1, 0, 0, 616, 0, 0 ], [ 1, 0, 0.1392, 0.0037, 0, 0.66,...
[ "'''\nCreated on May 22, 2011\n\n@author: flyxian\n'''", "import operator", "from PyQt4.QtCore import *", "from PyQt4.QtGui import *", "from MainDialog import *", "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s", " _fromUtf8 = QtCore.QString.fromUtf...
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'MainDialog.ui' # # Created: Sun May 29 21:22:32 2011 # by: PyQt4 UI code generator 4.8.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8...
[ [ 1, 0, 0.0855, 0.0085, 0, 0.66, 0, 154, 0, 2, 0, 0, 154, 0, 0 ], [ 7, 0, 0.1154, 0.0342, 0, 0.66, 0.5, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 14, 1, 0.1111, 0.0085, 1, 0.3, ...
[ "from PyQt4 import QtCore, QtGui", "try:\n _fromUtf8 = QtCore.QString.fromUtf8\nexcept AttributeError:\n _fromUtf8 = lambda s: s", " _fromUtf8 = QtCore.QString.fromUtf8", " _fromUtf8 = lambda s: s", "class Ui_MainDialog(object):\n def setupUi(self, MainDialog):\n MainDialog.setObjectNa...
####################################################################################### # # File: user_agent_lib # Part of 51cto-cheater # Home: http://51cto-cheater.googlecode.com # # Th...
[ [ 8, 0, 0.0082, 0.0012, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.009, 0.0002, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.01, 0.0012, 0, 0.66, ...
[ "'''\nCreated on May 29, 2011\n\n@author: flyxian\n'''", "import random", "UA_MSIE10 = [\"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0)\",\n\"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)\",\n\"Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/5.0)\",\n\"Mo...
#!/usr/bin/python from socket import * import struct,os,time,sys from ntp_server_lib import get_random_ntp_server # print get_random_ntp_server() time_server = (get_random_ntp_server(), 123) TIME1970 = 2208988800L # Thanks to F.Lundh def get_ntp_time(): client = socket( AF_INET, SOC...
[ [ 1, 0, 0.0714, 0.0357, 0, 0.66, 0, 687, 0, 1, 0, 0, 687, 0, 0 ], [ 1, 0, 0.1071, 0.0357, 0, 0.66, 0.25, 399, 0, 4, 0, 0, 399, 0, 0 ], [ 1, 0, 0.1786, 0.0357, 0, 0....
[ "from socket import *", "import struct,os,time,sys", "from ntp_server_lib import get_random_ntp_server", "time_server = (get_random_ntp_server(), 123)", "def get_ntp_time():\n client = socket( AF_INET, SOCK_DGRAM ) \n data = '\\x1b' + 47 * '\\0' \n client.sendto(data, time_server)\n try:\n ...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotohost.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotoh...
""" 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. from django.http import HttpResponse from models import Minidb from django.shortcuts import render_to_response def getimg(request, img, ext): imglink = Minidb.objects.get(link=img).image # html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink # return H...
[ [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66, 0.25, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.2667, 0.0667, 0, 0.66,...
[ "from django.http import HttpResponse", "from models import Minidb", "from django.shortcuts import render_to_response", "def getimg(request, img, ext):\n imglink = Minidb.objects.get(link=img).image\n# html = '<center><img src = \"http://4pic.kz/upload/images/%s\" /></center>' % imglink\n# return Htt...
#!/usr/bin/env python source=open('images.txt', 'r') dest=open('sql.txt', 'w') for i in source.readlines(): link = i[:-5] ext = "('%s', '%s'),\n" % (link, i[:-1]) dest.write(ext) source.close() dest.close()
[ [ 14, 0, 0.2222, 0.1111, 0, 0.66, 0, 703, 3, 2, 0, 0, 693, 10, 1 ], [ 14, 0, 0.3333, 0.1111, 0, 0.66, 0.25, 907, 3, 2, 0, 0, 693, 10, 1 ], [ 6, 0, 0.6111, 0.4444, 0, ...
[ "source=open('images.txt', 'r')", "dest=open('sql.txt', 'w')", "for i in source.readlines():\n link = i[:-5]\n ext = \"('%s', '%s'),\\n\" % (link, i[:-1])\n dest.write(ext)", " link = i[:-5]", " ext = \"('%s', '%s'),\\n\" % (link, i[:-1])", " dest.write(ext)", "source.close()", "dest...
#!/usr/bin/env python source=open('images.txt', 'r') dest=open('sql.txt', 'w') for i in source.readlines(): link = i[:-5] ext = "('%s', '%s'),\n" % (link, i[:-1]) dest.write(ext) source.close() dest.close()
[ [ 14, 0, 0.2222, 0.1111, 0, 0.66, 0, 703, 3, 2, 0, 0, 693, 10, 1 ], [ 14, 0, 0.3333, 0.1111, 0, 0.66, 0.25, 907, 3, 2, 0, 0, 693, 10, 1 ], [ 6, 0, 0.6111, 0.4444, 0, ...
[ "source=open('images.txt', 'r')", "dest=open('sql.txt', 'w')", "for i in source.readlines():\n link = i[:-5]\n ext = \"('%s', '%s'),\\n\" % (link, i[:-1])\n dest.write(ext)", " link = i[:-5]", " ext = \"('%s', '%s'),\\n\" % (link, i[:-1])", " dest.write(ext)", "source.close()", "dest...
# Django settings for fotohost project. DEBUG = False TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS FORCE_SCRIPT_NAME = '' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'....
[ [ 14, 0, 0.0195, 0.0065, 0, 0.66, 0, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.026, 0.0065, 0, 0.66, 0.04, 7, 2, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0455, 0.0195, 0, 0.66, ...
[ "DEBUG = False", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)", "MANAGERS = ADMINS", "FORCE_SCRIPT_NAME = ''", "DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n '...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from forpic.views import getimg, getimg2 # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'fotohost.views.home', name='home'), # url(r'^fotohos...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.2, 0.05, 0, 0.66, 0.3333, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.25, 0.05, 0, 0.66, 0.6...
[ "from django.conf.urls import patterns, include, url", "from django.contrib import admin", "from forpic.views import getimg, getimg2", "urlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'fotohost.views.home', name='home'),\n # url(r'^fotohost/', include('fotohost.foo.urls')),\n\n # Uncomment...
""" WSGI config for fotohost project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
[ [ 8, 0, 0.2857, 0.5357, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5714, 0.0357, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.6429, 0.0357, 0, 0.66, ...
[ "\"\"\"\nWSGI config for fotohost project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``runserver`` and ``runfcgi`` commands discover\nthis application via the ``WSGI...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotohost.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotoh...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotohost.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotoh...
""" 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. from django.http import HttpResponse from models import Minidb from django.shortcuts import render_to_response def getimg(request, img, ext): imglink = Minidb.objects.get(link=img).image # html = '<center><img src = "http://4pic.kz/upload/images/%s" /></center>' % imglink # return H...
[ [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.66, 0.25, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.2667, 0.0667, 0, 0.66,...
[ "from django.http import HttpResponse", "from models import Minidb", "from django.shortcuts import render_to_response", "def getimg(request, img, ext):\n imglink = Minidb.objects.get(link=img).image\n# html = '<center><img src = \"http://4pic.kz/upload/images/%s\" /></center>' % imglink\n# return Htt...
''' Created on 13.09.2012 @author: Admin '''
[ [ 8, 0, 0.6, 1, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ] ]
[ "'''\nCreated on 13.09.2012\n\n@author: Admin\n'''" ]
# Django settings for fotohost project. DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@example.com'), ) MANAGERS = ADMINS FORCE_SCRIPT_NAME = '' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. ...
[ [ 14, 0, 0.0195, 0.0065, 0, 0.66, 0, 309, 1, 0, 0, 0, 0, 4, 0 ], [ 14, 0, 0.026, 0.0065, 0, 0.66, 0.04, 7, 2, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.0455, 0.0195, 0, 0.66, ...
[ "DEBUG = True", "TEMPLATE_DEBUG = DEBUG", "ADMINS = (\n # ('Your Name', 'your_email@example.com'),\n)", "MANAGERS = ADMINS", "FORCE_SCRIPT_NAME = ''", "DATABASES = {\n 'default': {\n 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.\n 'N...
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin from forpic.views import getimg, getimg2 # admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'fotohost.views.home', name='home'), # url(r'^fotohos...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 528, 0, 3, 0, 0, 528, 0, 0 ], [ 1, 0, 0.2, 0.05, 0, 0.66, 0.3333, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.25, 0.05, 0, 0.66, 0.6...
[ "from django.conf.urls import patterns, include, url", "from django.contrib import admin", "from forpic.views import getimg, getimg2", "urlpatterns = patterns('',\n # Examples:\n # url(r'^$', 'fotohost.views.home', name='home'),\n # url(r'^fotohost/', include('fotohost.foo.urls')),\n\n # Uncomment...
""" WSGI config for fotohost project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
[ [ 8, 0, 0.2857, 0.5357, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.5714, 0.0357, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 8, 0, 0.6429, 0.0357, 0, 0.66, ...
[ "\"\"\"\nWSGI config for fotohost project.\n\nThis module contains the WSGI application used by Django's development server\nand any production WSGI deployments. It should expose a module-level variable\nnamed ``application``. Django's ``runserver`` and ``runfcgi`` commands discover\nthis application via the ``WSGI...
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "fotohost.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.5, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 4, 0, 0.75, 0.6, 0, 0.66, 1, 0, ...
[ "import os", "import sys", "if __name__ == \"__main__\":\n os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotohost.settings\")\n\n from django.core.management import execute_from_command_line\n\n execute_from_command_line(sys.argv)", " os.environ.setdefault(\"DJANGO_SETTINGS_MODULE\", \"fotoh...
import os import sys from unittest import TestCase here_dir = os.path.dirname(os.path.abspath(__file__)) conf_dir = os.path.dirname(os.path.dirname(here_dir)) sys.path.insert(0, conf_dir) import pkg_resources pkg_resources.working_set.add_entry(conf_dir) pkg_resources.require('Paste') pkg_resources.require('PasteS...
[ [ 1, 0, 0.0294, 0.0294, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0588, 0.0294, 0, 0.66, 0.0526, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0882, 0.0294, 0, ...
[ "import os", "import sys", "from unittest import TestCase", "here_dir = os.path.dirname(os.path.abspath(__file__))", "conf_dir = os.path.dirname(os.path.dirname(here_dir))", "sys.path.insert(0, conf_dir)", "import pkg_resources", "pkg_resources.working_set.add_entry(conf_dir)", "pkg_resources.requir...
from sqlalchemy import * meta = BoundMetaData('mysql://forlater:4l8r@localhost/forlater') users_table = Table('users', meta, autoload=True) researchers_table = Table('researchers', meta, autoload=True) studies_table = Table('studies', meta, autoload=True) entries_table = Table('entries', meta, autoload=True) snippets...
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 835, 0, 1, 0, 0, 835, 0, 0 ], [ 14, 0, 0.3333, 0.1111, 0, 0.66, 0.1667, 329, 3, 1, 0, 0, 916, 10, 1 ], [ 14, 0, 0.5556, 0.1111, 0, ...
[ "from sqlalchemy import *", "meta = BoundMetaData('mysql://forlater:4l8r@localhost/forlater')", "users_table = Table('users', meta, autoload=True)", "researchers_table = Table('researchers', meta, autoload=True)", "studies_table = Table('studies', meta, autoload=True)", "entries_table = Table('entries', m...
import paste.deploy def setup_config(command, filename, section, vars): """ Place any commands to setup forlater here. """ conf = paste.deploy.appconfig('config:' + filename) conf.update(dict(app_conf=conf.local_conf, global_conf=conf.global_conf)) paste.deploy.CONFIG.push_process_config(conf) ...
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 770, 0, 1, 0, 0, 770, 0, 0 ], [ 2, 0, 0.6, 0.7, 0, 0.66, 1, 405, 0, 4, 0, 0, 0, 0, 4 ], [ 8, 1, 0.5, 0.3, 1, 0.6, 0, 0, 1,...
[ "import paste.deploy", "def setup_config(command, filename, section, vars):\n \"\"\"\n Place any commands to setup forlater here.\n \"\"\"\n conf = paste.deploy.appconfig('config:' + filename)\n conf.update(dict(app_conf=conf.local_conf, global_conf=conf.global_conf))\n paste.deploy.CONFIG.push_...