code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
#!/usr/bin/env python ########################## #By:Anatoliy Liberman # #For: Genome Center UCD # #Supervisor: # # Alexander Kozik # # # ########################## import sys import os import fileinput import re opts = None #Returns the number of dom...
[ [ 1, 0, 0.0401, 0.0033, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0435, 0.0033, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0468, 0.0033, 0, ...
[ "import sys", "import os", "import fileinput", "import re", "opts = None", "def domain_HITS(fin):\n\thmm_FILE = open(fin, \"rb\")\n\tEVal_FILE = open(fout, \"a\")\n\tfor line in hmm_FILE:\n\t\tpos = line.find('Domain search space ')\n\t\tif pos != -1:\n\t\t\tdomainValueString = str(line)\n\t\t\tdomainV...
#!/usr/bin/env python ########################## #By:Anatoliy Liberman # #For: Genome Center UCD # #Supervisor: # # Alexander Kozik # # # ########################## import sys import os import fileinput import re opts = None #Returns the number of dom...
[ [ 1, 0, 0.0401, 0.0033, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0435, 0.0033, 0, 0.66, 0.0556, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0468, 0.0033, 0, ...
[ "import sys", "import os", "import fileinput", "import re", "opts = None", "def domain_HITS(fin):\n\thmm_FILE = open(fin, \"rb\")\n\tEVal_FILE = open(fout, \"a\")\n\tfor line in hmm_FILE:\n\t\tpos = line.find('Domain search space ')\n\t\tif pos != -1:\n\t\t\tdomainValueString = str(line)\n\t\t\tdomainV...
#!/usr/bin/python # Copyright 2011 Google, Inc. All Rights Reserved. # simple script to walk source tree looking for third-party licenses # dumps resulting html page to stdout import os, re, mimetypes, sys # read source directories to scan from command line SOURCE = sys.argv[1:] # regex to find /* */ style commen...
[ [ 1, 0, 0.0816, 0.0102, 0, 0.66, 0, 688, 0, 4, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1224, 0.0102, 0, 0.66, 0.0714, 792, 6, 0, 0, 0, 0, 0, 0 ], [ 14, 0, 0.1531, 0.0102, 0, ...
[ "import os, re, mimetypes, sys", "SOURCE = sys.argv[1:]", "COMMENT_BLOCK = re.compile(r\"(/\\*.+?\\*/)\", re.MULTILINE | re.DOTALL)", "COMMENT_LICENSE = re.compile(r\"(license)\", re.IGNORECASE)", "COMMENT_COPYRIGHT = re.compile(r\"(copyright)\", re.IGNORECASE)", "EXCLUDE_TYPES = [\n \"application/xml\...
#!/usr/bin/env python # -*- coding: utf-8 -*- import bisect #Entrada edificios (izq,alt,der) #Entrada de ejemplo del enunciado a = [ (4,15,10), (2,11,9), (7,7,18), (12,13,16), (20,9,28), (22,20,25), (26,13,29) ] #Entrada con edificios solapados #a = [ #(22,20,25), #(24,13,29), #(25,13,29), #(26,13,29), #(27,13,29), ...
[ [ 1, 0, 0.0361, 0.012, 0, 0.66, 0, 325, 0, 1, 0, 0, 325, 0, 0 ], [ 14, 0, 0.1386, 0.1205, 0, 0.66, 0.0909, 475, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.3614, 0.012, 0, 0....
[ "import bisect", "a = [\n\n(4,15,10),\n(2,11,9),\n(7,7,18),\n(12,13,16),\n(20,9,28),\n(22,20,25),", "id=0", "flancos = []", "for p in a:\n\t#subida\n\tflancos.append((p[0],p[1],True,id))\n\t#bajada\n\tflancos.append((p[2],p[1],False,id))\n\tid += 1", "\tflancos.append((p[0],p[1],True,id))", "\tflancos.a...
#!/usr/bin/python import random,\ sys MIN_CARGAS = 5 MAX_CARGAS = 5 MIN_CARGAS_PELIGRO = 1 MAX_CARGAS_PELIGRO = 6 cargas_disponibles = range(10) #menor cantidad de cargas utilizadas #hasta ahora en la mejor solucion. #menor_cantidad = -1 # for i in range(len(cargas_disponibles)): # for c in solucion.camiones # ...
[ [ 1, 0, 0.1029, 0.0588, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1765, 0.0294, 0, 0.66, 0.1667, 98, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.2059, 0.0294, 0, 0...
[ "import random,\\\n\tsys", "MIN_CARGAS = 5", "MAX_CARGAS = 5", "MIN_CARGAS_PELIGRO = 1", "MAX_CARGAS_PELIGRO = 6", "cargas_disponibles = range(10)", "for t in range(1):\n\tcantCargas =random.randint(MIN_CARGAS,MAX_CARGAS)\n\tlimitePeligro = random.randint(5,30)\n\tsys.stdout.write(\"%s %s\\n\" % (cantCa...
#!/usr/bin/python import sys #aca se puede ver los lugares a los que se puede saltar desde #la o, las x son los saltos posibles con 1 salto. #| |x| |x| | #|x| | | |x| #| | |o| | | #|x| | | |x| #| |x| |x| | #quiero saltar desde (x,y) a (w,z), el tablero tiene nXx y matriz es la tabla dinamica recorridoCount = 0 def ca...
[ [ 1, 0, 0.0235, 0.0118, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.1412, 0.0118, 0, 0.66, 0.0556, 55, 1, 0, 0, 0, 0, 1, 0 ], [ 2, 0, 0.4176, 0.5412, 0, 0....
[ "import sys", "recorridoCount = 0", "def cantidadDeSaltos(x,y,w,z,n,m):\n\n\tglobal matriz, recorrido, recorridoCount\n\n\tprint(\"|%s|%s|\" % (x,y))\n\tif recorrido[ (x*n) + y ] == 0:\n\t\tprint(\"aumento %s %s %s \" % (x,y,recorridoCount))\n\t\trecorridoCount += 1", "\tprint(\"|%s|%s|\" % (x,y))", "\tif r...
#!/usr/bin/python #matriz 4x4, tengo 4 ciudades #esta matriz, lo que indica, es para la posicion i,j #la lista de vuelos que hay. Osea lista de vuelos desde la ciudad i a la ciudad j #entonces por ej en [(0,1),(0,2)] estoy diciendo que hay 2 vuelos uno sale a las #0 y llega a las 2 y el otro sale a las 0 y llega a...
[ [ 14, 0, 0.1154, 0.0481, 0, 0.66, 0, 350, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2404, 0.0096, 0, 0.66, 0.2, 434, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.25, 0.0096, 0, 0.66, ...
[ "ciudades = [[ [] , [(0,1),(0,2)] , [ (1,3)], [ (3,4)] , []],\\\n\t\t [ [] , [] , [(4,6)] , [] ,[] ],\\\n\t\t [ [] , [] , [] , [] , [(8,10)] ],\\\n\t\t [ [] , [] , [] , [] , [(6,8)]],\\\n\t\t [ [] , []...
from random import uniform NUMTEST = 30 for test in range(0,NUMTEST): cantFilas = test for cantCaballos in range(0,int(cantFilas*cantFilas/2)): #cantCaballos = int(uniform(0,cantFilas*cantFilas)) print cantFilas,cantCaballos for c in range(1,cantCaballos+1): print int(uniform(1,cantFilas)),int(uniform(1,cant...
[ [ 1, 0, 0.0909, 0.0909, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1818, 0.0909, 0, 0.66, 0.3333, 404, 1, 0, 0, 0, 0, 1, 0 ], [ 6, 0, 0.5455, 0.6364, 0, 0...
[ "from random import uniform", "NUMTEST = 30", "for test in range(0,NUMTEST):\n\tcantFilas = test\n\tfor cantCaballos in range(0,int(cantFilas*cantFilas/2)):\n\t\t#cantCaballos = int(uniform(0,cantFilas*cantFilas))\n\t\tprint(cantFilas,cantCaballos)\n\t\tfor c in range(1,cantCaballos+1):\n\t\t\tprint(int(uniform...
from random import uniform NUMTEST = 100 for test in range(1,NUMTEST+1): cantNodos = test print cantNodos,(cantNodos*(cantNodos-1))/2 for u in range(1,cantNodos+1): for v in range(u+1,cantNodos+1): print u,v,int(uniform(0,100)) print 0
[ [ 1, 0, 0.0833, 0.0833, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1667, 0.0833, 0, 0.66, 0.3333, 404, 1, 0, 0, 0, 0, 1, 0 ], [ 6, 0, 0.4583, 0.5, 0, 0.66...
[ "from random import uniform", "NUMTEST = 100", "for test in range(1,NUMTEST+1):\n\tcantNodos = test\n\tprint(cantNodos,(cantNodos*(cantNodos-1))/2)\n\tfor u in range(1,cantNodos+1):\n\t\tfor v in range(u+1,cantNodos+1):\n\t\t\tprint(u,v,int(uniform(0,100)))", "\tcantNodos = test", "\tprint(cantNodos,(cantNo...
#!/usr/bin/python import random,\ sys MIN_VERTICES = 3 MAX_VERTICES = 10 INSTANCIAS = 50 MAX_EJE_PESO = 5 for i in range(INSTANCIAS): #cantidad de vertices. v = random.randint(MIN_VERTICES,MAX_VERTICES) #cantidad de ejes. #grafo esparso w = random.randint(v, max(int( ( (v*(v-1))* 0.5 )...
[ [ 1, 0, 0.0714, 0.0571, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1429, 0.0286, 0, 0.66, 0.1667, 413, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.1714, 0.0286, 0, ...
[ "import random,\\\n sys", "MIN_VERTICES = 3", "MAX_VERTICES = 10", "INSTANCIAS = 50", "MAX_EJE_PESO = 5", "for i in range(INSTANCIAS):\n \n #cantidad de vertices.\n v = random.randint(MIN_VERTICES,MAX_VERTICES)\n #cantidad de ejes.\n\n #grafo esparso\n w = random.randint(v, max(int(...
#!/usr/bin/python import random,\ sys MIN_VERTICES = 3 MAX_VERTICES = 15 INSTANCIAS = 500 MAX_EJE_PESO = 50 for i in range(INSTANCIAS): v = random.randint(MIN_VERTICES,MAX_VERTICES) w = random.randint(v,(v*(v-1))/2); k = random.randint(2,int(v/2)+1) ejes = set([]) pesos = dict([]) ...
[ [ 1, 0, 0.0926, 0.0741, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1852, 0.037, 0, 0.66, 0.1667, 413, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.2222, 0.037, 0, 0....
[ "import random,\\\n sys", "MIN_VERTICES = 3", "MAX_VERTICES = 15", "INSTANCIAS = 500", "MAX_EJE_PESO = 50", "for i in range(INSTANCIAS):\n \n v = random.randint(MIN_VERTICES,MAX_VERTICES)\n w = random.randint(v,(v*(v-1))/2);\n k = random.randint(2,int(v/2)+1)\n ejes = set([])\n peso...
#!/usr/bin/python import random,\ sys MIN_VERTICES = 3 MAX_VERTICES = 15 INSTANCIAS = 300 MAX_EJE_PESO = 50 for i in range(INSTANCIAS): v = random.randint(MIN_VERTICES,MAX_VERTICES) w = random.randint(v,int((v*(v-1))/4)+2); k = random.randint(2,int(v/4)+2) ejes = set([]) pesos = dict([]...
[ [ 1, 0, 0.0926, 0.0741, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1852, 0.037, 0, 0.66, 0.1667, 413, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.2222, 0.037, 0, 0....
[ "import random,\\\n sys", "MIN_VERTICES = 3", "MAX_VERTICES = 15", "INSTANCIAS = 300", "MAX_EJE_PESO = 50", "for i in range(INSTANCIAS):\n \n v = random.randint(MIN_VERTICES,MAX_VERTICES)\n w = random.randint(v,int((v*(v-1))/4)+2);\n k = random.randint(2,int(v/4)+2)\n ejes = set([])\n ...
#!/usr/bin/python import random,\ sys MIN_VERTICES = 3 MAX_VERTICES = 30 INSTANCIAS = 500 MAX_EJE_PESO = 100 for i in range(INSTANCIAS): v = random.randint(MIN_VERTICES,MAX_VERTICES) w = random.randint(((v*(v-1))/4),((v*(v-1))/2)); k = random.randint(2,int(v/2)+1) ejes = set([]) pesos =...
[ [ 1, 0, 0.0926, 0.0741, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1852, 0.037, 0, 0.66, 0.1667, 413, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.2222, 0.037, 0, 0....
[ "import random,\\\n sys", "MIN_VERTICES = 3", "MAX_VERTICES = 30", "INSTANCIAS = 500", "MAX_EJE_PESO = 100", "for i in range(INSTANCIAS):\n \n v = random.randint(MIN_VERTICES,MAX_VERTICES)\n w = random.randint(((v*(v-1))/4),((v*(v-1))/2));\n k = random.randint(2,int(v/2)+1)\n ejes = se...
#!/usr/bin/python import random,\ sys MIN_VERTICES = 3 MAX_VERTICES = 50 INSTANCIAS = 2000 MAX_EJE_PESO = 5 kmax = 1 disperso = False if(len(sys.argv) > 2 and sys.argv[2] == "-e"): disperso = True sys.stderr.write("Generando grafos dispersos\n") elif(len(sys.argv) > 1): sys.stderr.write("Generando gra...
[ [ 1, 0, 0.0455, 0.0364, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 14, 0, 0.0909, 0.0182, 0, 0.66, 0.0909, 413, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.1091, 0.0182, 0, ...
[ "import random,\\\n sys", "MIN_VERTICES = 3", "MAX_VERTICES = 50", "INSTANCIAS = 2000", "MAX_EJE_PESO = 5", "kmax = 1", "disperso = False", "if(len(sys.argv) > 2 and sys.argv[2] == \"-e\"):\n disperso = True\n sys.stderr.write(\"Generando grafos dispersos\\n\")\nelif(len(sys.argv) > 1):\n ...
import differential as p1 import numpy as np import matplotlib.pylab as mp from math import sqrt ## ------------------------- pendule simple ------------------------------## ## equation : ## y'' + W^2sin(y) = 0 si y petit y'' + W^2y = 0 avec W^2=g/l d = np.pi / 2 step = 0.001 N = int (d / step) # tige de longueur ...
[ [ 1, 0, 0.0106, 0.0106, 0, 0.66, 0, 439, 0, 1, 0, 0, 439, 0, 0 ], [ 1, 0, 0.0213, 0.0106, 0, 0.66, 0.0556, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0319, 0.0106, 0, ...
[ "import differential as p1", "import numpy as np", "import matplotlib.pylab as mp", "from math import sqrt", "d = np.pi / 2", "step = 0.001", "N = int (d / step)", "l=0.1", "g=9.81", "y0 = np.array([1.5, 0.])", "t0 = np.array(0)", "f_expe = lambda y, t: np.array([y[1], (-g/l)*np.sin(y[0])])", ...
import numpy as np import differential as p1 import matplotlib.pyplot as plt def resolution_eq(y0,t0,N,h,meth): """ Resolution des equations de Malthus et Verhuslt """ gamma = 2.9 k = 20e9 Malthus = lambda y,t : y Verhulst = lambda y,t : gamma*y*(1-(y/k)) X = p1.meth_N_step(y0,t0,N,h,Malthus,m...
[ [ 1, 0, 0.0147, 0.0147, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0294, 0.0147, 0, 0.66, 0.1429, 439, 0, 1, 0, 0, 439, 0, 0 ], [ 1, 0, 0.0441, 0.0147, 0, ...
[ "import numpy as np", "import differential as p1", "import matplotlib.pyplot as plt", "def resolution_eq(y0,t0,N,h,meth):\n \"\"\" Resolution des equations de Malthus et Verhuslt \"\"\"\n gamma = 2.9\n k = 20e9\n\n Malthus = lambda y,t : y\n Verhulst = lambda y,t : gamma*y*(1-(y/k))\n X = p1...
import differential as p1 import numpy as np import matplotlib.pyplot as mp from math import sqrt d = 3.14 step = 0.001 # tige de longueur 10cm N=3500 l=0.1 g=9.81 ## pendule a deux maillons ## # longueur de le tige 10cm masse de 1g m = 1 # Y=[y1, y2, y1', y2'] F(Y,t)=[y1', y2', y1'', y2''] ou y1'' et y2'' verifie...
[ [ 1, 0, 0.0099, 0.0099, 0, 0.66, 0, 439, 0, 1, 0, 0, 439, 0, 0 ], [ 1, 0, 0.0198, 0.0099, 0, 0.66, 0.0625, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0297, 0.0099, 0, ...
[ "import differential as p1", "import numpy as np", "import matplotlib.pyplot as mp", "from math import sqrt", "d = 3.14", "step = 0.001", "N=3500", "l=0.1", "g=9.81", "m = 1", "def modelisation_pendule_double(theta10, theta20):\n\tA0 = np.array([theta10, theta20, 0., 0.])\n\tT0 = 0\n\n\tpendule_...
import numpy as np import matplotlib.pylab as mp from math import exp ## CI dans un tableau ## ## METHODE D'EULER def step_euler(y,t,h,F): n=np.shape(y) z=np.zeros(n) z=y+h*F(y,t) return z ## METHODE DU POINT MILIEU def step_pt_milieu(y,t,h,F): n=np.shape(y) y_aux=np.zeros(n) ##y_aux repre...
[ [ 1, 0, 0.0056, 0.0056, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0111, 0.0056, 0, 0.66, 0.0833, 607, 0, 1, 0, 0, 607, 0, 0 ], [ 1, 0, 0.0167, 0.0056, 0, ...
[ "import numpy as np", "import matplotlib.pylab as mp", "from math import exp", "def step_euler(y,t,h,F):\n n=np.shape(y)\n z=np.zeros(n)\n z=y+h*F(y,t)\n return z", " n=np.shape(y)", " z=np.zeros(n)", " z=y+h*F(y,t)", " return z", "def step_pt_milieu(y,t,h,F):\n n=np.shape...
''' Created on 21-03-2011 @author: maciek ''' from formater import formatString import os class IndexGenerator(object): ''' Generates Index.html for iOS app OTA distribution ''' basePath = os.path.dirname(__file__) templateFile = os.path.join(basePath,"templates/index.tmpl") releaseUrls = "" ...
[ [ 8, 0, 0.0526, 0.0877, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1053, 0.0175, 0, 0.66, 0.3333, 11, 0, 1, 0, 0, 11, 0, 0 ], [ 1, 0, 0.1228, 0.0175, 0, 0.66, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from formater import formatString", "import os", "class IndexGenerator(object):\n '''\n Generates Index.html for iOS app OTA distribution\n '''\n basePath = os.path.dirname(__file__)\n templateFile = os.path.join(basePath,\"templates/index....
''' Created on 21-03-2011 @author: maciek ''' def formatString(format, **kwargs): ''' ''' if not format: return '' for arg in kwargs.keys(): format = format.replace("{" + arg + "}", "##" + arg + "##") format = format.replace ("{", "{{") format = format.replace("}", "}}") for...
[ [ 8, 0, 0.1304, 0.2174, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 2, 0, 0.6739, 0.6957, 0, 0.66, 1, 798, 0, 2, 1, 0, 0, 0, 9 ], [ 8, 1, 0.413, 0.087, 1, 0, 0, ...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "def formatString(format, **kwargs):\n '''\n '''\n if not format: return ''\n \n for arg in kwargs.keys():\n format = format.replace(\"{\" + arg + \"}\", \"##\" + arg + \"##\")\n format = format.replace (\"{\", \"{{\")", " '''\n ...
''' Created on 21-03-2011 @author: maciek ''' from IndexGenerator import IndexGenerator from optparse import OptionParser import os import tempfile import shutil import logging logging.basicConfig(level = logging.DEBUG) parser = OptionParser() parser.add_option('-n', '--app-name', action='store', dest='appName', hel...
[ [ 8, 0, 0.0341, 0.0568, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0682, 0.0114, 0, 0.66, 0.0303, 933, 0, 1, 0, 0, 933, 0, 0 ], [ 1, 0, 0.0795, 0.0114, 0, 0.66...
[ "'''\nCreated on 21-03-2011\n\n@author: maciek\n'''", "from IndexGenerator import IndexGenerator", "from optparse import OptionParser", "import os", "import tempfile", "import shutil", "import logging", "logging.basicConfig(level = logging.DEBUG)", "parser = OptionParser()", "parser.add_option('-n...
#! /usr/bin/env python # encoding: utf-8 # waf 1.6.2 VERSION='0.3.3' import sys APPNAME='p2t' top = '.' out = 'build' CPP_SOURCES = ['poly2tri/common/shapes.cc', 'poly2tri/sweep/cdt.cc', 'poly2tri/sweep/advancing_front.cc', 'poly2tri/sweep/sweep_context.cc', ...
[ [ 14, 0, 0.1111, 0.0222, 0, 0.66, 0, 557, 1, 0, 0, 0, 0, 3, 0 ], [ 1, 0, 0.1333, 0.0222, 0, 0.66, 0.0909, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.1556, 0.0222, 0, ...
[ "VERSION='0.3.3'", "import sys", "APPNAME='p2t'", "top = '.'", "out = 'build'", "CPP_SOURCES = ['poly2tri/common/shapes.cc',\n 'poly2tri/sweep/cdt.cc',\n 'poly2tri/sweep/advancing_front.cc',\n 'poly2tri/sweep/sweep_context.cc',\n 'poly2tri/sweep/swee...
#!/usr/bin/env python # This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any lat...
[ [ 1, 0, 0.4615, 0.0256, 0, 0.66, 0, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.4872, 0.0256, 0, 0.66, 0.1667, 93, 0, 1, 0, 0, 93, 0, 0 ], [ 14, 0, 0.5641, 0.0256, 0, 0...
[ "import urllib", "from zipfile import ZipFile", "TARGET = 'http://ip-to-country.webhosting.info/downloads/ip-to-country.csv.zip'", "OUT_FILE_NAME = 'ip-to-country.zip'", "def reporthook(blocknum, bs, size):\n\telapsed = (blocknum * bs) * 100 / size\n\tif elapsed > 100: elapsed = 100\n\tprint('%s%%' % elapse...
#!/usr/bin/env python # This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any lat...
[ [ 1, 0, 0.2857, 0.0159, 0, 0.66, 0, 312, 0, 1, 0, 0, 312, 0, 0 ], [ 1, 0, 0.3016, 0.0159, 0, 0.66, 0.1429, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3175, 0.0159, 0, ...
[ "import csv", "import os", "import sys", "from optparse import OptionParser", "from django.conf import settings", "from django_ip2country import models", "def main():\n if not 'DJANGO_SETTINGS_MODULE' in os.environ:\n print('DJANGO_SETTINGS_MODULE should be set, exiting.')\n sys.exit(0)...
# This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any later version. # # dja...
[ [ 1, 0, 0.4474, 0.0263, 0, 0.66, 0, 521, 0, 1, 0, 0, 521, 0, 0 ], [ 1, 0, 0.5, 0.0263, 0, 0.66, 0.5, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 3, 0, 0.7632, 0.3947, 0, 0.66, ...
[ "import bigint_patch", "from django.db import models", "class Ip2Country(models.Model):\n #ip_from = models.PositiveIntegerField()\n #ip_to = models.PositiveIntegerField()\n ip_from = bigint_patch.BigIntegerField()\n ip_to = bigint_patch.BigIntegerField()\n \n country_code2 = models.CharField(...
# This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any later version. # # dja...
[ [ 1, 0, 0.85, 0.05, 0, 0.66, 0, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.9, 0.05, 0, 0.66, 0.5, 6, 0, 1, 0, 0, 6, 0, 0 ], [ 8, 0, 1, 0.05, 0, 0.66, 1, 276, ...
[ "from django.contrib import admin", "from django_ip2country.models import Ip2Country", "admin.site.register(Ip2Country)" ]
# This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any later version. # # dja...
[ [ 1, 0, 0.5312, 0.0312, 0, 0.66, 0, 6, 0, 1, 0, 0, 6, 0, 0 ], [ 2, 0, 0.6406, 0.125, 0, 0.66, 0.5, 337, 0, 1, 1, 0, 0, 0, 5 ], [ 14, 1, 0.625, 0.0312, 1, 0.04, ...
[ "from django_ip2country.models import Ip2Country", "def ip2long(ip):\n ip_array = ip.split('.')\n ip_long = int(ip_array[0]) * 16777216 + int(ip_array[1]) * 65536 + int(ip_array[2]) * 256 + int(ip_array[3])\n return ip_long", " ip_array = ip.split('.')", " ip_long = int(ip_array[0]) * 16777216 ...
# This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any later version. # # dja...
[]
[]
# This file is part of django_ip2country. # django_ip2country 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 3 of the License, or # (at your option) any later version. # # dja...
[ [ 8, 0, 0.2158, 0.0842, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2737, 0.0105, 0, 0.66, 0.1, 913, 0, 1, 0, 0, 913, 0, 0 ], [ 1, 0, 0.2842, 0.0105, 0, 0.66, ...
[ "\"\"\"module mydjangolib.bigint_patch\n\nA fix for the rather well-known ticket #399 in the django project.\n\nCreate and link to auto-incrementing primary keys of type bigint without\nhaving to reload the model instance after saving it to get the ID set in\nthe instance.\n\"\"\"", "from django.core import excep...
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
[ [ 1, 0, 0.3514, 0.0135, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.3649, 0.0135, 0, 0.66, 0.1111, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.3784, 0.0135, 0, ...
[ "import os", "import re", "import tempfile", "import shutil", "ignore_pattern = re.compile('^(.svn|target|bin|classes)')", "java_pattern = re.compile('^.*\\.java')", "annot_pattern = re.compile('import org\\.apache\\.http\\.annotation\\.')", "def process_dir(dir):\n files = os.listdir(dir)\n for...
import numpy as np import householder as hh # fonction auxiliaire : def completeMat(A,n): "fonction qui sert a completer la matrice A avec des '1' sur l'element diagonale des lignes/colonnes deja traitees" #cette fonction ne modifie pas A si taille(A)=n Id=np.identity(n) i=A.shape[0] for j in...
[ [ 1, 0, 0.0213, 0.0213, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0426, 0.0213, 0, 0.66, 0.3333, 583, 0, 1, 0, 0, 583, 0, 0 ], [ 2, 0, 0.2234, 0.2128, 0, ...
[ "import numpy as np", "import householder as hh", "def completeMat(A,n):\n \"fonction qui sert a completer la matrice A avec des '1' sur l'element diagonale des lignes/colonnes deja traitees\"\n #cette fonction ne modifie pas A si taille(A)=n\n \n Id=np.identity(n)\n i=A.shape[0]\n for j in np...
# Partie I : Transformations de Householder import numpy as np from numpy import linalg as la # Question I def computeUtU(U): """Calcule le produit d'un vecteur par sa transposee""" n = len(U) RES = np.zeros([n,n]) for i in range(n): for j in range(n): RES[i,j] = U[i]*U[j] ret...
[ [ 1, 0, 0.0577, 0.0192, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0769, 0.0192, 0, 0.66, 0.1667, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.2212, 0.1538, 0, ...
[ "import numpy as np", "from numpy import linalg as la", "def computeUtU(U):\n \"\"\"Calcule le produit d'un vecteur par sa transposee\"\"\"\n n = len(U)\n RES = np.zeros([n,n])\n for i in range(n):\n for j in range(n):\n RES[i,j] = U[i]*U[j]\n return RES", " \"\"\"Calcule l...
# Fichier pour tester les differentes parties du projet import householder as hh import bidiagonale as bd import decompositionSVD as svd import compression as comp import numpy as np import matplotlib.pyplot as mp print "#############################################" print "# ...
[ [ 1, 0, 0.0267, 0.0067, 0, 0.66, 0, 583, 0, 1, 0, 0, 583, 0, 0 ], [ 1, 0, 0.0333, 0.0067, 0, 0.66, 0.0083, 885, 0, 1, 0, 0, 885, 0, 0 ], [ 1, 0, 0.04, 0.0067, 0, 0....
[ "import householder as hh", "import bidiagonale as bd", "import decompositionSVD as svd", "import compression as comp", "import numpy as np", "import matplotlib.pyplot as mp", "print(\"#############################################\")", "print(\"# #\")", "pri...
# Partie III : Transformations QR et decompostion SVD import numpy as np import householder as hh import matplotlib.pyplot as plt # Question I,II def externDiagNorme(A): """Affiche la norme-2 hors diagonale de la matrice""" n = len(A) p = len(A[0]) res = 0. for i in range(n): for j in ra...
[ [ 1, 0, 0.0238, 0.0079, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0317, 0.0079, 0, 0.66, 0.125, 583, 0, 1, 0, 0, 583, 0, 0 ], [ 1, 0, 0.0397, 0.0079, 0, 0...
[ "import numpy as np", "import householder as hh", "import matplotlib.pyplot as plt", "def externDiagNorme(A):\n \"\"\"Affiche la norme-2 hors diagonale de la matrice\"\"\"\n n = len(A)\n p = len(A[0])\n res = 0.\n for i in range(n):\n for j in range(n):\n if (i != j):", " ...
# Partie 4: Application a la compression d'image import numpy as np import bidiagonale as bd import decompositionSVD as svd import matplotlib.pyplot as mp #Question 1 def clean(compressed_img): """mise zero tous les elements inferieurs a valeur e""" e=pow(10,-5) img=compressed_img n=img.shape[0] for i in n...
[ [ 1, 0, 0.0385, 0.0096, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 1, 0, 0.0481, 0.0096, 0, 0.66, 0.125, 885, 0, 1, 0, 0, 885, 0, 0 ], [ 1, 0, 0.0577, 0.0096, 0, 0...
[ "import numpy as np", "import bidiagonale as bd", "import decompositionSVD as svd", "import matplotlib.pyplot as mp", "def clean(compressed_img):\n\t\"\"\"mise zero tous les elements inferieurs a valeur e\"\"\"\n\te=pow(10,-5) \n\timg=compressed_img\n\tn=img.shape[0]\n\t\n\tfor i in np.arange(n):\n\t\tfor j...
from google.appengine.api import urlfetch from django.utils import simplejson as json class Mendeley: '''Mendeley open client for algos''' REQUEST_TOKEN_URL = 'http://www.mendeley.com/oauth/request_token/' ACCESS_TOKEN_URL = 'http://www.mendeley.com/oauth/access_token/' AUTHORIZATION_URL ...
[ [ 1, 0, 0.02, 0.02, 0, 0.66, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 0, 0.04, 0.02, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.54, 0.94, 0, 0.66, 1, ...
[ "from google.appengine.api import urlfetch", "from django.utils import simplejson as json", "class Mendeley:\n '''Mendeley open client for algos'''\n \n REQUEST_TOKEN_URL = 'http://www.mendeley.com/oauth/request_token/'\n ACCESS_TOKEN_URL = 'http://www.mendeley.com/oauth/access_token/'\n AUTHORI...
""" The MIT License Copyright (c) 2007 Leah Culver 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, modify, merge...
[ [ 8, 0, 0.0183, 0.0351, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0382, 0.0015, 0, 0.66, 0.0385, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0397, 0.0015, 0, 0.66...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007 Leah Culver\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", "import cgi", ...
from django.conf.urls.defaults import * urlpatterns = patterns('articles.views', (r'^$', 'index'), (r'^articles.js$', 'get_articles_json') )
[ [ 1, 0, 0.1667, 0.1667, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.75, 0.6667, 0, 0.66, 1, 990, 3, 3, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('articles.views',\n (r'^$', 'index'),\n (r'^articles.js$', 'get_articles_json')\n)" ]
from django.core.cache import cache from django import http from django.contrib.auth.forms import UserCreationForm from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from articles.Mendeley import Mendeley def get_articles_json(request): mendeley = Mendel...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.1429, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.2, 0.0667, 0, 0.6...
[ "from django.core.cache import cache", "from django import http", "from django.contrib.auth.forms import UserCreationForm", "from django.http import HttpResponseRedirect", "from django.views.generic.simple import direct_to_template", "from articles.Mendeley import Mendeley", "def get_articles_json(reque...
from django.conf.urls.defaults import * urlpatterns = patterns('massmedia.views', (r'^$', 'index') )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('massmedia.views',\n (r'^$', 'index')\n)" ]
# -*- encoding: utf-8 -*- from django.core.cache import cache from django.contrib.auth.forms import UserCreationForm from django.views.generic.simple import direct_to_template from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template def index(request): title_p...
[ [ 1, 0, 0.2, 0.1, 0, 0.66, 0, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.2, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 1, 0, 0.4, 0.1, 0, 0.66, 0.4, 95...
[ "from django.core.cache import cache", "from django.contrib.auth.forms import UserCreationForm", "from django.views.generic.simple import direct_to_template", "from django.http import HttpResponseRedirect", "from django.views.generic.simple import direct_to_template", "def index(request):\n title_page ...
#!/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.99, ...
[ "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('tractament.views', (r'^$', 'index'), )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('tractament.views',\n (r'^$', 'index'),\n)" ]
from django.views.generic.simple import direct_to_template from contact.contact_form import ContactForm def index(request): title_page = 'Tractament' if request.method == 'GET': # If the form has been submitted... form = ContactForm({'subject' : '[web algos] Formulari de tractament'}) # An ...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 956, 0, 1, 0, 0, 956, 0, 0 ], [ 1, 0, 0.1538, 0.0769, 0, 0.66, 0.5, 151, 0, 1, 0, 0, 151, 0, 0 ], [ 2, 0, 0.6538, 0.7692, 0, 0.6...
[ "from django.views.generic.simple import direct_to_template", "from contact.contact_form import ContactForm", "def index(request):\n title_page = 'Tractament'\n \n if request.method == 'GET': # If the form has been submitted...\n form = ContactForm({'subject' : '[web algos] Formulari de tractame...
import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files.storage import Storage from django.core.files.uploadedfile import UploadedFile from django.core.files.uploadhandler im...
[ [ 1, 0, 0.0059, 0.0059, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 7, 0, 0.0266, 0.0237, 0, 0.66, 0.0625, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0237, 0.0059, 1, 0.95...
[ "import os", "try:\n from cStringIO import StringIO\nexcept ImportError:\n from StringIO import StringIO", " from cStringIO import StringIO", " from StringIO import StringIO", "from django.conf import settings", "from django.core.files.base import File", "from django.core.files.storage impor...
from .testmodels import OrderedModel from django.test import TestCase class OrderTest(TestCase): def create_ordered_model_items(self): pks = [] priorities = [5, 2, 9, 1] for pk, priority in enumerate(priorities): pk += 1 model = OrderedModel(pk=pk, priority=priority)...
[ [ 1, 0, 0.0175, 0.0175, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0351, 0.0175, 0, 0.66, 0.5, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 3, 0, 0.5088, 0.8947, 0, 0.6...
[ "from .testmodels import OrderedModel", "from django.test import TestCase", "class OrderTest(TestCase):\n def create_ordered_model_items(self):\n pks = []\n priorities = [5, 2, 9, 1]\n for pk, priority in enumerate(priorities):\n pk += 1\n model = OrderedModel(pk=pk...
from .testmodels import DecimalModel from django.test import TestCase from decimal import Decimal D = Decimal class DecimalTest(TestCase): DECIMALS = D("12345.6789"), D("5"), D("345.67"), D("45.6"), D("2345.678"), def setUp(self): for d in self.DECIMALS: DecimalModel(decimal=d).save() ...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0.25, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.1333, 0.0333, 0, 0....
[ "from .testmodels import DecimalModel", "from django.test import TestCase", "from decimal import Decimal", "D = Decimal", "class DecimalTest(TestCase):\n DECIMALS = D(\"12345.6789\"), D(\"5\"), D(\"345.67\"), D(\"45.6\"), D(\"2345.678\"),\n\n def setUp(self):\n for d in self.DECIMALS:\n ...
from .testmodels import FieldsWithOptionsModel, EmailModel, DateTimeModel, OrderedModel from ..db.utils import get_cursor import datetime, time from django.test import TestCase from django.db.models import Q from django.db.utils import DatabaseError from djangoappengine.db.utils import set_cursor from djangoappe...
[ [ 1, 0, 0.0023, 0.0023, 0, 0.66, 0, 808, 0, 4, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0047, 0.0023, 0, 0.66, 0.1111, 158, 0, 1, 0, 0, 158, 0, 0 ], [ 1, 0, 0.007, 0.0023, 0, 0...
[ "from .testmodels import FieldsWithOptionsModel, EmailModel, DateTimeModel, OrderedModel", "from ..db.utils import get_cursor", "import datetime, time", "from django.test import TestCase", "from django.db.models import Q", "from django.db.utils import DatabaseError", "from djangoappengine.db.utils impor...
from django.db import models from django.test import TestCase from django.db.utils import DatabaseError class A(models.Model): value = models.IntegerField() class B(A): other = models.IntegerField() class BackendTest(TestCase): def test_model_forms(self): from django import forms class F(...
[ [ 1, 0, 0.04, 0.04, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.08, 0.04, 0, 0.66, 0.2, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.12, 0.04, 0, 0.66, 0.4, ...
[ "from django.db import models", "from django.test import TestCase", "from django.db.utils import DatabaseError", "class A(models.Model):\n value = models.IntegerField()", " value = models.IntegerField()", "class B(A):\n other = models.IntegerField()", " other = models.IntegerField()", "cla...
from .testmodels import FieldsWithOptionsModel, OrderedModel, SelfReferenceModel import datetime from django.test import TestCase from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned class NonReturnSetsTest(TestCase): floats = [5.3, 2.6, 9.1, 1.58, 2.4] emails = ['app-engine@scholard...
[ [ 1, 0, 0.0104, 0.0104, 0, 0.66, 0, 808, 0, 3, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0208, 0.0104, 0, 0.66, 0.25, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0312, 0.0104, 0, 0....
[ "from .testmodels import FieldsWithOptionsModel, OrderedModel, SelfReferenceModel", "import datetime", "from django.test import TestCase", "from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned", "class NonReturnSetsTest(TestCase):\n floats = [5.3, 2.6, 9.1, 1.58, 2.4]\n email...
from django.test import TestCase from django.db.utils import DatabaseError from django.db.models.fields import NOT_PROVIDED from .testmodels import FieldsWithOptionsModel from google.appengine.api.datastore import Get from google.appengine.ext.db import Key from google.appengine.api.datastore_types import Text, C...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.025, 0.0125, 0, 0.66, 0.1111, 495, 0, 1, 0, 0, 495, 0, 0 ], [ 1, 0, 0.0375, 0.0125, 0, 0...
[ "from django.test import TestCase", "from django.db.utils import DatabaseError", "from django.db.models.fields import NOT_PROVIDED", "from .testmodels import FieldsWithOptionsModel", "from google.appengine.api.datastore import Get", "from google.appengine.ext.db import Key", "from google.appengine.api.d...
from .backend import BackendTest from .field_db_conversion import FieldDBConversionTest from .field_options import FieldOptionsTest from .filter import FilterTest from .order import OrderTest from .not_return_sets import NonReturnSetsTest from .decimals import DecimalTest
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 631, 0, 1, 0, 0, 631, 0, 0 ], [ 1, 0, 0.2857, 0.1429, 0, 0.66, 0.1667, 83, 0, 1, 0, 0, 83, 0, 0 ], [ 1, 0, 0.4286, 0.1429, 0, 0....
[ "from .backend import BackendTest", "from .field_db_conversion import FieldDBConversionTest", "from .field_options import FieldOptionsTest", "from .filter import FilterTest", "from .order import OrderTest", "from .not_return_sets import NonReturnSetsTest", "from .decimals import DecimalTest" ]
from django.db import models from ..db.db_settings import get_indexes from djangotoolbox.fields import BlobField class EmailModel(models.Model): email = models.EmailField() class DateTimeModel(models.Model): datetime = models.DateTimeField() datetime_auto_now = models.DateTimeField(auto_now=True)...
[ [ 1, 0, 0.0112, 0.0112, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0225, 0.0112, 0, 0.66, 0.0909, 87, 0, 1, 0, 0, 87, 0, 0 ], [ 1, 0, 0.0337, 0.0112, 0, 0.66...
[ "from django.db import models", "from ..db.db_settings import get_indexes", "from djangotoolbox.fields import BlobField", "class EmailModel(models.Model):\n email = models.EmailField()", " email = models.EmailField()", "class DateTimeModel(models.Model):\n datetime = models.DateTimeField()\n d...
from .testmodels import FieldsWithoutOptionsModel from django.test import TestCase from google.appengine.api.datastore import Get from google.appengine.ext.db import Key from google.appengine.api.datastore_types import Text, Category, Email, Link, \ PhoneNumber, PostalAddress, Text, Blob, ByteString, GeoPt, IM, Key...
[ [ 1, 0, 0.0159, 0.0159, 0, 0.66, 0, 808, 0, 1, 0, 0, 808, 0, 0 ], [ 1, 0, 0.0317, 0.0159, 0, 0.66, 0.1429, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.0476, 0.0159, 0, ...
[ "from .testmodels import FieldsWithoutOptionsModel", "from django.test import TestCase", "from google.appengine.api.datastore import Get", "from google.appengine.ext.db import Key", "from google.appengine.api.datastore_types import Text, Category, Email, Link, \\\n PhoneNumber, PostalAddress, Text, Blob,...
# Initialize App Engine SDK if necessary try: from google.appengine.api import api_proxy_stub_map except ImportError: from .boot import setup_env setup_env() from djangoappengine.utils import on_production_server, have_appserver DEBUG = not on_production_server TEMPLATE_DEBUG = DEBUG ROOT_URL...
[ [ 7, 0, 0.1026, 0.1282, 0, 0.66, 0, 0, 0, 1, 0, 0, 0, 0, 1 ], [ 1, 1, 0.0769, 0.0256, 1, 0.86, 0, 279, 0, 1, 0, 0, 279, 0, 0 ], [ 1, 1, 0.1282, 0.0256, 1, 0.86, ...
[ "try:\n from google.appengine.api import api_proxy_stub_map\nexcept ImportError:\n from .boot import setup_env\n setup_env()", " from google.appengine.api import api_proxy_stub_map", " from .boot import setup_env", " setup_env()", "from djangoappengine.utils import on_production_server, ha...
import os import sys # Add parent folder to sys.path, so we can import boot. # App Engine causes main.py to be reloaded if an exception gets raised # on the first request of a main.py instance, so don't add project_dir multiple # times. project_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirna...
[ [ 1, 0, 0.0106, 0.0106, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0213, 0.0106, 0, 0.66, 0.0588, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 14, 0, 0.0851, 0.0106, 0, ...
[ "import os", "import sys", "project_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))", "if project_dir not in sys.path or sys.path.index(project_dir) > 0:\n while project_dir in sys.path:\n sys.path.remove(project_dir)\n sys.path.insert(0, project_dir)", " w...
from django.core.management import execute_from_command_line from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Runs a command with access to the remote App Engine production ' \ 'server (e.g. manage.py remote shell)' args = 'remotecommand' def run_from_argv...
[ [ 1, 0, 0.0667, 0.0667, 0, 0.66, 0, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 1, 0, 0.1333, 0.0667, 0, 0.66, 0.5, 931, 0, 1, 0, 0, 931, 0, 0 ], [ 3, 0, 0.6333, 0.8, 0, 0.66, ...
[ "from django.core.management import execute_from_command_line", "from django.core.management.base import BaseCommand", "class Command(BaseCommand):\n help = 'Runs a command with access to the remote App Engine production ' \\\n 'server (e.g. manage.py remote shell)'\n args = 'remotecommand'\n\n ...
#!/usr/bin/python2.4 # # 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...
[ [ 1, 0, 0.2917, 0.0139, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.3056, 0.0139, 0, 0.66, 0.1429, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 1, 0, 0.3194, 0.0139, 0, ...
[ "from django.conf import settings", "from django.core.management import call_command", "from django.core.management.base import BaseCommand", "import logging", "import sys", "import time", "def run_appcfg(argv):\n # We don't really want to use that one though, it just executes this one\n from goog...
#!/usr/bin/python2.4 # # 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 applica...
[ [ 1, 0, 0.1935, 0.0108, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.2043, 0.0108, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2151, 0.0108, 0, 0...
[ "import logging", "import os", "import sys", "from django.db import connections", "from ...db.base import DatabaseWrapper", "from django.core.management.base import BaseCommand", "from django.core.exceptions import ImproperlyConfigured", "def start_dev_appserver(argv):\n \"\"\"Starts the App Engine...
#!/usr/bin/python2.4 # # 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...
[ [ 1, 0, 0.2917, 0.0139, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.3056, 0.0139, 0, 0.66, 0.1429, 879, 0, 1, 0, 0, 879, 0, 0 ], [ 1, 0, 0.3194, 0.0139, 0, ...
[ "from django.conf import settings", "from django.core.management import call_command", "from django.core.management.base import BaseCommand", "import logging", "import sys", "import time", "def run_appcfg(argv):\n # We don't really want to use that one though, it just executes this one\n from goog...
#!/usr/bin/python2.4 # # 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 la...
[ [ 1, 0, 0.2466, 0.0137, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2603, 0.0137, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2877, 0.0137, 0, 0.6...
[ "import os", "import sys", "from .runserver import start_dev_appserver", "from django.core.management.base import BaseCommand", "from djangoappengine.db.base import destroy_datastore, get_test_datastore_paths", "class Command(BaseCommand):\n \"\"\"Overrides the default Django testserver command.\n\n ...
#!/usr/bin/python2.4 # # 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 la...
[ [ 1, 0, 0.2466, 0.0137, 0, 0.66, 0, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2603, 0.0137, 0, 0.66, 0.2, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.2877, 0.0137, 0, 0.6...
[ "import os", "import sys", "from .runserver import start_dev_appserver", "from django.core.management.base import BaseCommand", "from djangoappengine.db.base import destroy_datastore, get_test_datastore_paths", "class Command(BaseCommand):\n \"\"\"Overrides the default Django testserver command.\n\n ...
#!/usr/bin/python2.4 # # 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 applica...
[ [ 1, 0, 0.1935, 0.0108, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.2043, 0.0108, 0, 0.66, 0.125, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.2151, 0.0108, 0, 0...
[ "import logging", "import os", "import sys", "from django.db import connections", "from ...db.base import DatabaseWrapper", "from django.core.management.base import BaseCommand", "from django.core.exceptions import ImproperlyConfigured", "def start_dev_appserver(argv):\n \"\"\"Starts the App Engine...
from .db_settings import get_indexes from djangotoolbox.db.creation import NonrelDatabaseCreation class StringType(object): def __init__(self, internal_type): self.internal_type = internal_type def __mod__(self, field): indexes = get_indexes().get(field['model'], {}) if field['name'] i...
[ [ 1, 0, 0.0238, 0.0238, 0, 0.66, 0, 236, 0, 1, 0, 0, 236, 0, 0 ], [ 1, 0, 0.0476, 0.0238, 0, 0.66, 0.25, 682, 0, 1, 0, 0, 682, 0, 0 ], [ 3, 0, 0.2143, 0.2619, 0, 0....
[ "from .db_settings import get_indexes", "from djangotoolbox.db.creation import NonrelDatabaseCreation", "class StringType(object):\n def __init__(self, internal_type):\n self.internal_type = internal_type\n\n def __mod__(self, field):\n indexes = get_indexes().get(field['model'], {})\n ...
from google.appengine.datastore.datastore_pb import CompiledCursor import base64 def get_cursor(queryset): # Evaluate QuerySet len(queryset) cursor = getattr(queryset.query, '_gae_cursor', None) return base64.urlsafe_b64encode(cursor.Encode()) def set_cursor(queryset, start=None, end=None): ...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 334, 0, 1, 0, 0, 334, 0, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.3333, 177, 0, 1, 0, 0, 177, 0, 0 ], [ 2, 0, 0.3, 0.25, 0, 0.66, 0.66...
[ "from google.appengine.datastore.datastore_pb import CompiledCursor", "import base64", "def get_cursor(queryset):\n # Evaluate QuerySet\n len(queryset)\n cursor = getattr(queryset.query, '_gae_cursor', None)\n return base64.urlsafe_b64encode(cursor.Encode())", " len(queryset)", " cursor = ...
from django.conf import settings from django.utils.importlib import import_module _MODULE_NAMES = getattr(settings, 'GAE_SETTINGS_MODULES', ()) FIELD_INDEXES = None # TODO: add support for eventual consistency setting on specific models def get_indexes(): global FIELD_INDEXES if FIELD_INDEXES is None: ...
[ [ 1, 0, 0.05, 0.05, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.1, 0.05, 0, 0.66, 0.25, 118, 0, 1, 0, 0, 118, 0, 0 ], [ 14, 0, 0.2, 0.05, 0, 0.66, 0.5, ...
[ "from django.conf import settings", "from django.utils.importlib import import_module", "_MODULE_NAMES = getattr(settings, 'GAE_SETTINGS_MODULES', ())", "FIELD_INDEXES = None", "def get_indexes():\n global FIELD_INDEXES\n if FIELD_INDEXES is None:\n field_indexes = {}\n for name in _MODU...
from google.appengine.api.memcache import *
[ [ 1, 0, 1, 1, 0, 0.66, 0, 901, 0, 1, 0, 0, 901, 0, 0 ] ]
[ "from google.appengine.api.memcache import *" ]
import os, sys parent_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__)))) if parent_dir not in sys.path: sys.path.insert(0, parent_dir) # Initialize Django from djangoappengine.main import main as gaemain # Import and run the actual handler from google.appengine.ext.deferred.handle...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 688, 0, 2, 0, 0, 688, 0, 0 ], [ 14, 0, 0.2308, 0.0769, 0, 0.66, 0.2, 129, 3, 1, 0, 0, 142, 10, 4 ], [ 4, 0, 0.3462, 0.1538, 0, 0...
[ "import os, sys", "parent_dir = os.path.abspath(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))", "if parent_dir not in sys.path:\n sys.path.insert(0, parent_dir)", " sys.path.insert(0, parent_dir)", "from djangoappengine.main import main as gaemain", "from google.appengine.ext.deferred...
#!/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.21, ...
[ "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 import forms class ContactForm(forms.Form): message = forms.CharField(widget=forms.Textarea) subject = forms.CharField(widget=forms.HiddenInput) sender = forms.EmailField() cc_myself = forms.BooleanField(required=False)
[ [ 1, 0, 0.1429, 0.1429, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 3, 0, 0.7143, 0.7143, 0, 0.66, 1, 340, 0, 0, 0, 0, 953, 0, 4 ], [ 14, 1, 0.5714, 0.1429, 1, 0.88...
[ "from django import forms", "class ContactForm(forms.Form):\n message = forms.CharField(widget=forms.Textarea)\n subject = forms.CharField(widget=forms.HiddenInput)\n sender = forms.EmailField()\n cc_myself = forms.BooleanField(required=False)", " message = forms.CharField(widget=forms.T...
from django.conf.urls.defaults import * urlpatterns = patterns('contact.views', (r'^contactForm', 'contactForm') )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('contact.views',\n (r'^contactForm', 'contactForm')\n)" ]
from django.conf.urls.defaults import * from django.contrib.auth.forms import AuthenticationForm from django.views.generic.simple import direct_to_template from django.views.generic.simple import redirect_to handler500 = 'djangotoolbox.errorviews.server_error' urlpatterns = patterns('', (r'^$', direct_to_...
[ [ 1, 0, 0.0455, 0.0455, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0.2, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 1, 0, 0.1364, 0.0455, 0, 0.6...
[ "from django.conf.urls.defaults import *", "from django.contrib.auth.forms import AuthenticationForm", "from django.views.generic.simple import direct_to_template", "from django.views.generic.simple import redirect_to", "handler500 = 'djangotoolbox.errorviews.server_error'", "urlpatterns = patterns('',\n ...
from .fields import ListField, SetField, DictField, EmbeddedModelField from django.db import models, connections from django.db.models import Q from django.db.utils import DatabaseError from django.test import TestCase from django.utils import unittest class ListModel(models.Model): floating_point = models...
[ [ 1, 0, 0.004, 0.004, 0, 0.66, 0, 358, 0, 4, 0, 0, 358, 0, 0 ], [ 1, 0, 0.0079, 0.004, 0, 0.66, 0.0556, 40, 0, 2, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0119, 0.004, 0, 0.66, ...
[ "from .fields import ListField, SetField, DictField, EmbeddedModelField", "from django.db import models, connections", "from django.db.models import Q", "from django.db.utils import DatabaseError", "from django.test import TestCase", "from django.utils import unittest", "class ListModel(models.Model):\n...
from django.conf import settings from django.core.serializers.json import DjangoJSONEncoder from django.http import HttpResponse from django.utils import simplejson from django.utils.encoding import force_unicode from django.utils.functional import Promise class LazyEncoder(DjangoJSONEncoder): def default(self, ob...
[ [ 1, 0, 0.0385, 0.0385, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0769, 0.0385, 0, 0.66, 0.125, 521, 0, 1, 0, 0, 521, 0, 0 ], [ 1, 0, 0.1154, 0.0385, 0, 0...
[ "from django.conf import settings", "from django.core.serializers.json import DjangoJSONEncoder", "from django.http import HttpResponse", "from django.utils import simplejson", "from django.utils.encoding import force_unicode", "from django.utils.functional import Promise", "class LazyEncoder(DjangoJSON...
# All fields except for BlobField written by Jonas Haag <[email protected]> from django.db import models from django.core.exceptions import ValidationError from django.utils.importlib import import_module __all__ = ('RawField', 'ListField', 'DictField', 'SetField', 'BlobField', 'EmbeddedModelField') ...
[ [ 1, 0, 0.0128, 0.0043, 0, 0.66, 0, 40, 0, 1, 0, 0, 40, 0, 0 ], [ 1, 0, 0.0171, 0.0043, 0, 0.66, 0.0909, 160, 0, 1, 0, 0, 160, 0, 0 ], [ 1, 0, 0.0214, 0.0043, 0, 0....
[ "from django.db import models", "from django.core.exceptions import ValidationError", "from django.utils.importlib import import_module", "__all__ = ('RawField', 'ListField', 'DictField', 'SetField',\n 'BlobField', 'EmbeddedModelField')", "class _HandleAssignment(object):\n \"\"\"\n A placeh...
from django.conf import settings from django.http import HttpResponseRedirect from django.utils.cache import patch_cache_control LOGIN_REQUIRED_PREFIXES = getattr(settings, 'LOGIN_REQUIRED_PREFIXES', ()) NO_LOGIN_REQUIRED_PREFIXES = getattr(settings, 'NO_LOGIN_REQUIRED_PREFIXES', ()) class LoginRequiredMiddleware(obj...
[ [ 1, 0, 0.0189, 0.0189, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0377, 0.0189, 0, 0.66, 0.1429, 779, 0, 1, 0, 0, 779, 0, 0 ], [ 1, 0, 0.0566, 0.0189, 0, ...
[ "from django.conf import settings", "from django.http import HttpResponseRedirect", "from django.utils.cache import patch_cache_control", "LOGIN_REQUIRED_PREFIXES = getattr(settings, 'LOGIN_REQUIRED_PREFIXES', ())", "NO_LOGIN_REQUIRED_PREFIXES = getattr(settings, 'NO_LOGIN_REQUIRED_PREFIXES', ())", "class...
from django.conf import settings from django.core.cache import cache from django.contrib.sites.models import Site from djangotoolbox.utils import make_tls_property _default_site_id = getattr(settings, 'SITE_ID', None) SITE_ID = settings.__class__.SITE_ID = make_tls_property() class DynamicSiteIDMiddleware(obj...
[ [ 1, 0, 0.0172, 0.0172, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0345, 0.0172, 0, 0.66, 0.1667, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.0517, 0.0172, 0, ...
[ "from django.conf import settings", "from django.core.cache import cache", "from django.contrib.sites.models import Site", "from djangotoolbox.utils import make_tls_property", "_default_site_id = getattr(settings, 'SITE_ID', None)", "SITE_ID = settings.__class__.SITE_ID = make_tls_property()", "class Dy...
from .utils import object_list_to_table, equal_lists from django.test import TestCase from django.test.simple import DjangoTestSuiteRunner, DjangoTestRunner import sys try: from StringIO import StringIO except ImportError: from cStringIO import StringIO class ModelTestCase(TestCase): """ A...
[ [ 1, 0, 0.0096, 0.0096, 0, 0.66, 0, 970, 0, 2, 0, 0, 970, 0, 0 ], [ 1, 0, 0.0192, 0.0096, 0, 0.66, 0.1429, 944, 0, 1, 0, 0, 944, 0, 0 ], [ 1, 0, 0.0288, 0.0096, 0, ...
[ "from .utils import object_list_to_table, equal_lists", "from django.test import TestCase", "from django.test.simple import DjangoTestSuiteRunner, DjangoTestRunner", "import sys", "try:\n from StringIO import StringIO\nexcept ImportError:\n from cStringIO import StringIO", " from StringIO import ...
def make_tls_property(default=None): """Creates a class-wide instance property with a thread-specific value.""" class TLSProperty(object): def __init__(self): from threading import local self.local = local() def __get__(self, instance, cls): if not instance: ...
[ [ 2, 0, 0.1223, 0.234, 0, 0.66, 0, 317, 0, 1, 1, 0, 0, 0, 4 ], [ 8, 1, 0.0213, 0.0106, 1, 0.92, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 1, 0.1223, 0.1915, 1, 0.92, 0....
[ "def make_tls_property(default=None):\n \"\"\"Creates a class-wide instance property with a thread-specific value.\"\"\"\n class TLSProperty(object):\n def __init__(self):\n from threading import local\n self.local = local()\n\n def __get__(self, instance, cls):", " \"...
from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User, Group class UserForm(forms.ModelForm): class Meta: model = User fields = ('username', 'email', 'first_name', 'last_name', 'is_active', ...
[ [ 1, 0, 0.0556, 0.0556, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1111, 0.0556, 0, 0.66, 0.125, 302, 0, 1, 0, 0, 302, 0, 0 ], [ 1, 0, 0.1667, 0.0556, 0, 0...
[ "from django import forms", "from django.contrib import admin", "from django.contrib.auth.admin import UserAdmin", "from django.contrib.auth.models import User, Group", "class UserForm(forms.ModelForm):\n class Meta:\n model = User\n fields = ('username', 'email', 'first_name', 'last_name',...
from django.forms import widgets from django.template.defaultfilters import filesizeformat from django.utils.safestring import mark_safe class BlobWidget(widgets.FileInput): def render(self, name, value, attrs=None): try: blob_size = len(value) except: blob_size = 0 ...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 666, 0, 1, 0, 0, 666, 0, 0 ], [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0.3333, 913, 0, 1, 0, 0, 913, 0, 0 ], [ 1, 0, 0.2143, 0.0714, 0, ...
[ "from django.forms import widgets", "from django.template.defaultfilters import filesizeformat", "from django.utils.safestring import mark_safe", "class BlobWidget(widgets.FileInput):\n def render(self, name, value, attrs=None):\n try:\n blob_size = len(value)\n except:\n ...
from django.db.backends.creation import BaseDatabaseCreation class NonrelDatabaseCreation(BaseDatabaseCreation): data_types = { 'AutoField': 'integer', 'BigIntegerField': 'long', 'BooleanField': 'bool', 'CharField': 'text', 'CommaSeparatedInteg...
[ [ 1, 0, 0.0303, 0.0303, 0, 0.66, 0, 340, 0, 1, 0, 0, 340, 0, 0 ], [ 3, 0, 0.5455, 0.9394, 0, 0.66, 1, 2, 0, 0, 0, 0, 484, 0, 0 ], [ 14, 1, 0.5606, 0.9091, 1, 0.65, ...
[ "from django.db.backends.creation import BaseDatabaseCreation", "class NonrelDatabaseCreation(BaseDatabaseCreation):\n data_types = {\n 'AutoField': 'integer',\n 'BigIntegerField': 'long',\n 'BooleanField': 'bool',\n 'CharField': 'text',\n 'CommaSeparat...
from django.conf import settings from django.db.models.sql import aggregates as sqlaggregates from django.db.models.sql.compiler import SQLCompiler from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE from django.db.models.sql.where import AND, OR, Constraint from django.db.utils import DatabaseErr...
[ [ 1, 0, 0.0028, 0.0028, 0, 0.66, 0, 128, 0, 1, 0, 0, 128, 0, 0 ], [ 1, 0, 0.0055, 0.0028, 0, 0.66, 0.0769, 841, 0, 1, 0, 0, 841, 0, 0 ], [ 1, 0, 0.0083, 0.0028, 0, ...
[ "from django.conf import settings", "from django.db.models.sql import aggregates as sqlaggregates", "from django.db.models.sql.compiler import SQLCompiler", "from django.db.models.sql.constants import LOOKUP_SEP, MULTI, SINGLE", "from django.db.models.sql.where import AND, OR, Constraint", "from django.db...
import datetime from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, \ BaseDatabaseWrapper, BaseDatabaseClient, BaseDatabaseValidation, \ BaseDatabaseIntrospection from .creation import NonrelDatabaseCreation class NonrelDatabaseFeatures(BaseDatabaseFeatures): can_return_id...
[ [ 1, 0, 0.0111, 0.0111, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0.1111, 981, 0, 6, 0, 0, 981, 0, 0 ], [ 1, 0, 0.0667, 0.0111, 0, ...
[ "import datetime", "from django.db.backends import BaseDatabaseFeatures, BaseDatabaseOperations, \\\n BaseDatabaseWrapper, BaseDatabaseClient, BaseDatabaseValidation, \\\n BaseDatabaseIntrospection", "from .creation import NonrelDatabaseCreation", "class NonrelDatabaseFeatures(BaseDatabaseFeatures):\n ...
from django import http from django.template import Context, RequestContext, loader def server_error(request, template_name='500.html'): """ 500 error handler. Templates: `500.html` Context: request_path The path of the requested URL (e.g., '/app/pages/bad_page/') """ t = l...
[ [ 1, 0, 0.0714, 0.0714, 0, 0.66, 0, 294, 0, 1, 0, 0, 294, 0, 0 ], [ 1, 0, 0.1429, 0.0714, 0, 0.66, 0.5, 213, 0, 3, 0, 0, 213, 0, 0 ], [ 2, 0, 0.6429, 0.7857, 0, 0.6...
[ "from django import http", "from django.template import Context, RequestContext, loader", "def server_error(request, template_name='500.html'):\n \"\"\"\n 500 error handler.\n\n Templates: `500.html`\n Context:\n request_path\n The path of the requested URL (e.g., '/app/pages/bad_p...
from djangoappengine.settings_base import * import os SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi' LANGUAGE_CODE = 'ca' INSTALLED_APPS = ( 'djangoappengine', 'djangotoolbox', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', '...
[ [ 1, 0, 0.025, 0.025, 0, 0.66, 0, 423, 0, 1, 0, 0, 423, 0, 0 ], [ 1, 0, 0.075, 0.025, 0, 0.66, 0.0909, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.125, 0.025, 0, 0.66,...
[ "from djangoappengine.settings_base import *", "import os", "SECRET_KEY = '=r-$b*8hglm+858&9t043hlm6-&6-3d3vfc4((7yd0dbrakhvi'", "LANGUAGE_CODE = 'ca'", "INSTALLED_APPS = (\n 'djangoappengine',\n 'djangotoolbox',\n 'django.contrib.auth',\n 'django.contrib.contenttypes',\n 'django.contrib.sess...
""" Mendeley Open API Example Client Copyright (c) 2010, Mendeley Ltd. <[email protected]> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWAR...
[ [ 8, 0, 0.0523, 0.1027, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1046, 0.0019, 0, 0.66, 0.1111, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 1, 0, 0.1065, 0.0019, 0, 0.66...
[ "\"\"\"\nMendeley Open API Example Client\n\nCopyright (c) 2010, Mendeley Ltd. <[email protected]>\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copie...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
[ [ 8, 0, 0.0158, 0.0303, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.033, 0.0013, 0, 0.66, 0.0357, 614, 0, 1, 0, 0, 614, 0, 0 ], [ 1, 0, 0.0343, 0.0013, 0, 0.66,...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\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 withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
[ [ 8, 0, 0.3, 0.575, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.625, 0.025, 0, 0.66, 0.3333, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.65, 0.025, 0, 0.66, 0.6...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\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 withou...
""" The MIT License Copyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel 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 ...
[ [ 8, 0, 0.2927, 0.561, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.6098, 0.0244, 0, 0.66, 0.25, 311, 0, 1, 0, 0, 311, 0, 0 ], [ 1, 0, 0.6341, 0.0244, 0, 0.66, ...
[ "\"\"\"\nThe MIT License\n\nCopyright (c) 2007-2010 Leah Culver, Joe Stump, Mark Paschal, Vic Fryzel\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 withou...
""" Mendeley Open API Example Client Copyright (c) 2010, Mendeley Ltd. <[email protected]> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWAR...
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 276, 0, 1, 0, 0, 276, 0, 0 ], [ 1, 0, 0.4, 0.2, 0, 0.66, 0.3333, 493, 0, 1, 0, 0, 493, 0, 0 ], [ 1, 0, 0.6, 0.2, 0, 0.66, 0.6667, ...
[ "from pprint import pprint", "from mendeley_client import MendeleyClient", "import json", "import os" ]
class AlgosSection: titlePage = "under construction"
[ [ 3, 0, 0.75, 1, 0, 0.66, 0, 167, 0, 0, 0, 0, 0, 0, 0 ], [ 14, 1, 1, 0.5, 1, 0.36, 0, 54, 1, 0, 0, 0, 0, 3, 0 ] ]
[ "class AlgosSection:\n titlePage = \"under construction\"", " titlePage = \"under construction\"" ]
from django.conf.urls.defaults import * urlpatterns = patterns('algos.views', (r'^$', 'index'), (r'^sobrealgos$', 'index'), (r'^quisom$', 'quisom'), (r'^contactar$', 'contactar') )
[ [ 1, 0, 0.125, 0.125, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.6875, 0.75, 0, 0.66, 1, 990, 3, 5, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('algos.views',\n (r'^$', 'index'),\n (r'^sobrealgos$', 'index'),\n (r'^quisom$', 'quisom'),\n (r'^contactar$', 'contactar')\n)" ]
from django.core.cache import cache from django.contrib.auth.forms import UserCreationForm from django.views.generic.simple import direct_to_template from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from algos.models import AlgosSection def index(request): ...
[ [ 1, 0, 0.0526, 0.0526, 0, 0.66, 0, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.1053, 0.0526, 0, 0.66, 0.125, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 1, 0, 0.1579, 0.0526, 0, 0...
[ "from django.core.cache import cache", "from django.contrib.auth.forms import UserCreationForm", "from django.views.generic.simple import direct_to_template", "from django.http import HttpResponseRedirect", "from django.views.generic.simple import direct_to_template", "from algos.models import AlgosSectio...
from django.conf.urls.defaults import * urlpatterns = patterns('projects.views', (r'^$', 'index') )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('projects.views',\n (r'^$', 'index')\n)" ]
from django.core.cache import cache from django.contrib.auth.forms import UserCreationForm from django.views.generic.simple import direct_to_template from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template from algos.models import AlgosSection def index(request): ...
[ [ 1, 0, 0.1, 0.1, 0, 0.66, 0, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.2, 0.1, 0, 0.66, 0.1667, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 1, 0, 0.3, 0.1, 0, 0.66, 0.3333, ...
[ "from django.core.cache import cache", "from django.contrib.auth.forms import UserCreationForm", "from django.views.generic.simple import direct_to_template", "from django.http import HttpResponseRedirect", "from django.views.generic.simple import direct_to_template", "from algos.models import AlgosSectio...
from django.conf.urls.defaults import * urlpatterns = patterns('linies.views', (r'^$', 'index') )
[ [ 1, 0, 0.2, 0.2, 0, 0.66, 0, 341, 0, 1, 0, 0, 341, 0, 0 ], [ 14, 0, 0.8, 0.6, 0, 0.66, 1, 990, 3, 2, 0, 0, 75, 10, 1 ] ]
[ "from django.conf.urls.defaults import *", "urlpatterns = patterns('linies.views',\n (r'^$', 'index')\n)" ]
from django.core.cache import cache from django.contrib.auth.forms import UserCreationForm from django.views.generic.simple import direct_to_template from django.http import HttpResponseRedirect from django.views.generic.simple import direct_to_template def index(request): title_page = "Recerca" return...
[ [ 1, 0, 0.1111, 0.1111, 0, 0.66, 0, 734, 0, 1, 0, 0, 734, 0, 0 ], [ 1, 0, 0.2222, 0.1111, 0, 0.66, 0.2, 579, 0, 1, 0, 0, 579, 0, 0 ], [ 1, 0, 0.3333, 0.1111, 0, 0.6...
[ "from django.core.cache import cache", "from django.contrib.auth.forms import UserCreationForm", "from django.views.generic.simple import direct_to_template", "from django.http import HttpResponseRedirect", "from django.views.generic.simple import direct_to_template", "def index(request):\n title_page ...
import datetime import os import re import sys from django.conf import settings from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound from django.template import (Template, Context, TemplateDoesNotExist, TemplateSyntaxError) from django.utils.html import escape from django.u...
[ [ 1, 0, 0.0012, 0.0012, 0, 0.66, 0, 426, 0, 1, 0, 0, 426, 0, 0 ], [ 1, 0, 0.0023, 0.0012, 0, 0.66, 0.05, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0035, 0.0012, 0, 0....
[ "import datetime", "import os", "import re", "import sys", "from django.conf import settings", "from django.http import HttpResponse, HttpResponseServerError, HttpResponseNotFound", "from django.template import (Template, Context, TemplateDoesNotExist,\n TemplateSyntaxError)", "from django.utils.ht...
""" Decorators for views based on HTTP headers. """ try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from calendar import timegm from datetime import timedelta from email.Utils import formatdate from django.utils.decorators im...
[ [ 8, 0, 0.0122, 0.0183, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 7, 0, 0.0396, 0.0244, 0, 0.66, 0.0526, 0, 0, 1, 0, 0, 0, 0, 0 ], [ 1, 1, 0.0366, 0.0061, 1, 0.9, ...
[ "\"\"\"\nDecorators for views based on HTTP headers.\n\"\"\"", "try:\n from functools import wraps\nexcept ImportError:\n from django.utils.functional import wraps # Python 2.4 fallback.", " from functools import wraps", " from django.utils.functional import wraps # Python 2.4 fallback.", "fro...