code
stringlengths
1
1.49M
vector
listlengths
0
7.38k
snippet
listlengths
0
7.38k
def agPalindr(s): n=len(s) m=[[0 for x in range(n+1)] for y in range(n+1)] for ini in range(2,n+1): j,i=ini,0 while j<=n: if s[i]==s[j-1]: m[i][j]=m[i+1][j-1] else: m[i][j]=min(m[i][j-1],m[i+1][j])+1 j+=1 i+=1 print '\n'.join(map(lambda x:' '.join(map(str,x)),m)) return m[0][n] f=open('palindromo....
[ [ 2, 0, 0.4062, 0.75, 0, 0.66, 0, 553, 0, 1, 1, 0, 0, 0, 10 ], [ 14, 1, 0.125, 0.0625, 1, 0.31, 0, 773, 3, 1, 0, 0, 890, 10, 1 ], [ 14, 1, 0.1875, 0.0625, 1, 0.31, ...
[ "def agPalindr(s):\n\tn=len(s)\n\tm=[[0 for x in range(n+1)] for y in range(n+1)]\n\tfor ini in range(2,n+1):\n\t\tj,i=ini,0\n\t\twhile j<=n:\n\t\t\tif s[i]==s[j-1]: m[i][j]=m[i+1][j-1]\n\t\t\telse: m[i][j]=min(m[i][j-1],m[i+1][j])+1", "\tn=len(s)", "\tm=[[0 for x in range(n+1)] for y in range(n+1)]", "\tfor ...
def pr(h): print "-",' '.join(map(str,h[0])) print "-",' '.join(map(str,h[1])) print "-",' '.join(map(str,h[2])) print def solve(h,s,d,n): if n==1: h[d].append(h[s].pop()) #print "move el ",h[d][len(h[d])-1]," de ",s+1," a ",d+1 pr(h) else: solve(h,s,3-s-d,n-1) h[d].append(h[s].pop()) #print "move el...
[ [ 2, 0, 0.3947, 0.7368, 0, 0.66, 0, 37, 0, 1, 0, 0, 0, 0, 17 ], [ 8, 1, 0.1053, 0.0526, 1, 0.7, 0, 535, 3, 2, 0, 0, 0, 0, 3 ], [ 8, 1, 0.1579, 0.0526, 1, 0.7, 0...
[ "def pr(h):\n\tprint(\"-\",' '.join(map(str,h[0])))\n\tprint(\"-\",' '.join(map(str,h[1])))\n\tprint(\"-\",' '.join(map(str,h[2])))\n\tif n==1:\n\t\th[d].append(h[s].pop())\n\t\t#print \"move el \",h[d][len(h[d])-1],\" de \",s+1,\" a \",d+1\n\t\tpr(h)", "\tprint(\"-\",' '.join(map(str,h[0])))", "\tprint(\"-\",'...
def mochila(C,k): M=[True]+[False]*k for i in range(len(C)): for j in reversed(range(k+1)): M[j]=M[j] or M[j-C[i]] print ''.join([x and '#' or '_' for x in M]) if M[k]: return True return M[k] print mochila([1,2,3,4,5,6],7)
[ [ 2, 0, 0.45, 0.8, 0, 0.66, 0, 797, 0, 2, 1, 0, 0, 0, 6 ], [ 14, 1, 0.2, 0.1, 1, 0.56, 0, 727, 4, 0, 0, 0, 0, 0, 0 ], [ 6, 1, 0.5, 0.5, 1, 0.56, 0.5, 826, ...
[ "def mochila(C,k):\n\tM=[True]+[False]*k\n\tfor i in range(len(C)):\n\t\tfor j in reversed(range(k+1)):\n\t\t\tM[j]=M[j] or M[j-C[i]]\n\t\tprint(''.join([x and '#' or '_' for x in M]))\n\t\tif M[k]: return True\n\treturn M[k]", "\tM=[True]+[False]*k", "\tfor i in range(len(C)):\n\t\tfor j in reversed(range(k+1)...
def pasos(u,v): n,m=len(u),len(v) M1=range(m+1) M2=[1]*(m+1) for i in range(1,n+1): M2[0]=i for j in range(1,m+1): M2[j]=min(M2[j-1]+1, M1[j]+1, M1[j-1]+(u[i-1]!=v[j-1] and 1 or 0)) M1=M2[:] print ''.join([str(x) for x in M1]) return M1[m] print pasos('abc','abx')
[ [ 2, 0, 0.4615, 0.8462, 0, 0.66, 0, 617, 0, 2, 1, 0, 0, 0, 9 ], [ 14, 1, 0.1538, 0.0769, 1, 0.98, 0, 51, 0, 0, 0, 0, 0, 8, 2 ], [ 14, 1, 0.2308, 0.0769, 1, 0.98, ...
[ "def pasos(u,v):\n\tn,m=len(u),len(v)\n\tM1=range(m+1)\n\tM2=[1]*(m+1)\n\tfor i in range(1,n+1):\n\t\tM2[0]=i\n\t\tfor j in range(1,m+1):\n\t\t\tM2[j]=min(M2[j-1]+1, M1[j]+1, M1[j-1]+(u[i-1]!=v[j-1] and 1 or 0))", "\tn,m=len(u),len(v)", "\tM1=range(m+1)", "\tM2=[1]*(m+1)", "\tfor i in range(1,n+1):\n\t\tM2[...
from random import random,randint from math import sqrt def dist(a,b): return sqrt((a[0]-b[0])**2 + (a[1]-b[1])**2) def sumx(C): return reduce(lambda x,y:x+y,C,0) def mind(C): if len(C)==2: return dist(C[0],C[1]) elif len(C)<2: return float("Inf") C.sort(key=lambda x:x[0]) r=C[len(C)/2][0] d1=mind(C[:len(C)/2...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 715, 0, 2, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0833, 0.0417, 0, 0.66, 0.1429, 526, 0, 1, 0, 0, 526, 0, 0 ], [ 2, 0, 0.1875, 0.0833, 0, ...
[ "from random import random,randint", "from math import sqrt", "def dist(a,b):\n\treturn sqrt((a[0]-b[0])**2 + (a[1]-b[1])**2)", "\treturn sqrt((a[0]-b[0])**2 + (a[1]-b[1])**2)", "def sumx(C):\n\treturn reduce(lambda x,y:x+y,C,0)", "\treturn reduce(lambda x,y:x+y,C,0)", "def mind(C):\n\tif len(C)==2: ret...
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('instance80_24/data.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for x in todo if x] tabu=[int(x.sp...
[ [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1818, 0.0455, 0, 0.66, 0.0667, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2273, 0.0455, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('instance80_24/data.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "exacto=[int(x.split()[0]) for x in todo if x]", "constru=[int(x.split()[1]) for x in todo if x]", "local=[int(x.split()[2]) for x in todo if x]",...
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0556, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0...
[ "from matplotlib.pyplot import *", "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "data = \"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])])", "todo=data.strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]",...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0556, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0...
[ "from matplotlib.pyplot import *", "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "data = \"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])])", "todo=data.strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]",...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#! /usr/bin/python files=["constructiva.out","busq_local.out","tabu.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data_big.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0625, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2174, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_big.dat')", "tam=open('hard_big_tamanios')", "todo=fin.read().strip().split('\\n')", "constru=[int(x.split()[0]) for x in todo if x]", "local=[int(x.split()[1]) for x in todo if x]", "xs=tabu=[int(x.split()[2]) for x in todo if x]", "title(\"Comparaci...
#! /usr/bin/python files=["constructiva.out","busq_local.out","tabu.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data_big.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0625, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2174, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_big.dat')", "tam=open('hard_big_tamanios')", "todo=fin.read().strip().split('\\n')", "constru=[int(x.split()[0]) for x in todo if x]", "local=[int(x.split()[1]) for x in todo if x]", "xs=tabu=[int(x.split()[2]) for x in todo if x]", "title(\"Comparaci...
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 70 MAX_CLAUS = 300 MAX_VARS = 40 MAX_VARS_POR_CLAUS = 10 f = open("hard_big.in",'w') clausulas=open("hard_big_tamanios",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) clausulas.write(str(c)+"\n") v = randint(1,MAX_VA...
[ [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.66, 0.1, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1667, 0.0333, 0, 0.66,...
[ "from random import randint", "from random import choice", "INSTANCIAS = 70", "MAX_CLAUS = 300", "MAX_VARS = 40", "MAX_VARS_POR_CLAUS = 10", "f = open(\"hard_big.in\",'w')", "clausulas=open(\"hard_big_tamanios\",'w')", "for i in xrange(INSTANCIAS):\n\tc = randint(1,MAX_CLAUS)\n\tclausulas.write(str(...
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 70 MAX_CLAUS = 300 MAX_VARS = 40 MAX_VARS_POR_CLAUS = 10 f = open("hard_big.in",'w') clausulas=open("hard_big_tamanios",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) clausulas.write(str(c)+"\n") v = randint(1,MAX_VA...
[ [ 1, 0, 0.0667, 0.0333, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1, 0.0333, 0, 0.66, 0.1, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1667, 0.0333, 0, 0.66,...
[ "from random import randint", "from random import choice", "INSTANCIAS = 70", "MAX_CLAUS = 300", "MAX_VARS = 40", "MAX_VARS_POR_CLAUS = 10", "f = open(\"hard_big.in\",'w')", "clausulas=open(\"hard_big_tamanios\",'w')", "for i in xrange(INSTANCIAS):\n\tc = randint(1,MAX_CLAUS)\n\tclausulas.write(str(...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 1 MAX_CLAUS = 300 MAX_VARS = 300 MAX_VARS_POR_CLAUS = 3 f = open("hard.in",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) v = randint(1,MAX_VARS) f.write("%d %d\r\n"%(c,v)) for j in xrange(c): l = randint(1,randin...
[ [ 1, 0, 0.0741, 0.037, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1111, 0.037, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1852, 0.037, 0, 0....
[ "from random import randint", "from random import choice", "INSTANCIAS = 1", "MAX_CLAUS = 300", "MAX_VARS = 300", "MAX_VARS_POR_CLAUS = 3", "f = open(\"hard.in\",'w')", "for i in xrange(INSTANCIAS):\n\tc = randint(1,MAX_CLAUS)\n\tv = randint(1,MAX_VARS)\n\tf.write(\"%d %d\\r\\n\"%(c,v))\n\tfor j in xr...
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('instance80_24/data.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for x in todo if x] tabu=[int(x.sp...
[ [ 1, 0, 0.0909, 0.0455, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1818, 0.0455, 0, 0.66, 0.0667, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2273, 0.0455, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('instance80_24/data.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "exacto=[int(x.split()[0]) for x in todo if x]", "constru=[int(x.split()[1]) for x in todo if x]", "local=[int(x.split()[2]) for x in todo if x]",...
#! /usr/bin/python files=["constructiva_big.out","busq_local_big.out","tabu_big.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"constructiva_big.out\",\"busq_local_big.out\",\"tabu_big.out\"]", "f=open(\"data_big.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0625, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2174, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_big.dat')", "tam=open('hard_big_tamanios')", "todo=fin.read().strip().split('\\n')", "constru=[int(x.split()[0]) for x in todo if x]", "local=[int(x.split()[1]) for x in todo if x]", "xs=tabu=[int(x.split()[2]) for x in todo if x]", "title(\"Comparaci...
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0556, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0...
[ "from matplotlib.pyplot import *", "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "data = \"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])])", "todo=data.strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]",...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] data = "\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]) todo=data.strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split(...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0556, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0...
[ "from matplotlib.pyplot import *", "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "data = \"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])])", "todo=data.strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]",...
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('p_iter1.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] ys=[int(x.split()[1]) for x in todo if x] #title("Cantidad de operaciones de $matching$") xlabel("MAX_ITER") ylabel("clausulas ...
[ [ 1, 0, 0.1111, 0.0556, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0.1, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.3333, 0.0556, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('p_iter1.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "ys=[int(x.split()[1]) for x in todo if x]", "xlabel(\"MAX_ITER\")", "ylabel(\"clausulas satisfechas\")", "plot(xs,ys,'ro',label=\"tabu\")", "legend(loc=...
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('p_iter1.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] ys=[int(x.split()[1]) for x in todo if x] #title("Cantidad de operaciones de $matching$") xlabel("MAX_ITER") ylabel("clausulas ...
[ [ 1, 0, 0.1111, 0.0556, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.2778, 0.0556, 0, 0.66, 0.1, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.3333, 0.0556, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('p_iter1.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "ys=[int(x.split()[1]) for x in todo if x]", "xlabel(\"MAX_ITER\")", "ylabel(\"clausulas satisfechas\")", "plot(xs,ys,'ro',label=\"tabu\")", "legend(loc=...
#! /usr/bin/python from random import randint from random import choice INSTANCIAS = 1 MAX_CLAUS = 300 MAX_VARS = 300 MAX_VARS_POR_CLAUS = 3 f = open("hard.in",'w') for i in xrange(INSTANCIAS): c = randint(1,MAX_CLAUS) v = randint(1,MAX_VARS) f.write("%d %d\r\n"%(c,v)) for j in xrange(c): l = randint(1,randin...
[ [ 1, 0, 0.0741, 0.037, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.1111, 0.037, 0, 0.66, 0.1111, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 14, 0, 0.1852, 0.037, 0, 0....
[ "from random import randint", "from random import choice", "INSTANCIAS = 1", "MAX_CLAUS = 300", "MAX_VARS = 300", "MAX_VARS_POR_CLAUS = 3", "f = open(\"hard.in\",'w')", "for i in xrange(INSTANCIAS):\n\tc = randint(1,MAX_CLAUS)\n\tv = randint(1,MAX_VARS)\n\tf.write(\"%d %d\\r\\n\"%(c,v))\n\tfor j in xr...
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('data_tiempos.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for ...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0.66, 0.0667, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2609, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_tiempos.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "exacto=[int(x.split()[0]) for x in todo if x]", "constru=[int(x.split()[1]) for x in todo if x]", "local=[int(x.split()[2]) for x in todo if x]", "ta...
#! /usr/bin/python #files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] #f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])])) files=["exacto.log","constructiva.log","busq_local.log","tabu.log"] f=open("data_tiempos.dat",'w').wr...
[ [ 14, 0, 0.8571, 0.1429, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.1429, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.log\",\"constructiva.log\",\"busq_local.log\",\"tabu.log\"]", "f=open(\"data_tiempos.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\") for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * #fin=open('instance80_24/data.dat') fin=open('data_tiempos.dat') todo=fin.read().strip().split('\n') xs=[int(x.split()[0]) for x in todo if x] exacto=[int(x.split()[0]) for x in todo if x] constru=[int(x.split()[1]) for x in todo if x] local=[int(x.split()[2]) for ...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.2174, 0.0435, 0, 0.66, 0.0667, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2609, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_tiempos.dat')", "todo=fin.read().strip().split('\\n')", "xs=[int(x.split()[0]) for x in todo if x]", "exacto=[int(x.split()[0]) for x in todo if x]", "constru=[int(x.split()[1]) for x in todo if x]", "local=[int(x.split()[2]) for x in todo if x]", "ta...
#! /usr/bin/python #files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] #f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])])) files=["exacto.log","constructiva.log","busq_local.log","tabu.log"] f=open("data_tiempos.dat",'w').wr...
[ [ 14, 0, 0.8571, 0.1429, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.1429, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.log\",\"constructiva.log\",\"busq_local.log\",\"tabu.log\"]", "f=open(\"data_tiempos.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\") for f in files])]))" ]
#! /usr/bin/python files=["exacto.out","constructiva.out","busq_local.out","tabu.out"] f=open("data.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"exacto.out\",\"constructiva.out\",\"busq_local.out\",\"tabu.out\"]", "f=open(\"data.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#! /usr/bin/python files=["constructiva_big.out","busq_local_big.out","tabu_big.out"] f=open("data_big.dat",'w').write("\n".join([" ".join(map(str,z)) for z in zip(*[open(f).read().split("\n")[::3] for f in files])]))
[ [ 14, 0, 0.75, 0.25, 0, 0.66, 0, 598, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 1, 0.25, 0, 0.66, 1, 899, 3, 1, 0, 0, 837, 10, 9 ] ]
[ "files=[\"constructiva_big.out\",\"busq_local_big.out\",\"tabu_big.out\"]", "f=open(\"data_big.dat\",'w').write(\"\\n\".join([\" \".join(map(str,z)) for z in zip(*[open(f).read().split(\"\\n\")[::3] for f in files])]))" ]
#!/usr/bin/env python from matplotlib.pyplot import * fin=open('data_big.dat') tam=open('hard_big_tamanios') todo=fin.read().strip().split('\n') #xs=tam.read().split() constru=[int(x.split()[0]) for x in todo if x] local=[int(x.split()[1]) for x in todo if x] xs=tabu=[int(x.split()[2]) for x in todo if x] title("Comp...
[ [ 1, 0, 0.087, 0.0435, 0, 0.66, 0, 596, 0, 1, 0, 0, 596, 0, 0 ], [ 14, 0, 0.1739, 0.0435, 0, 0.66, 0.0625, 225, 3, 1, 0, 0, 693, 10, 1 ], [ 14, 0, 0.2174, 0.0435, 0, ...
[ "from matplotlib.pyplot import *", "fin=open('data_big.dat')", "tam=open('hard_big_tamanios')", "todo=fin.read().strip().split('\\n')", "constru=[int(x.split()[0]) for x in todo if x]", "local=[int(x.split()[1]) for x in todo if x]", "xs=tabu=[int(x.split()[2]) for x in todo if x]", "title(\"Comparaci...
from random import randint def mprint(m): return '\n'.join(map(lambda x:''.join([el and '#' or '_' for el in x]),m)) fout=open('test_sanos.in','w') for n in range(6,40): for caso in range(10): M=[[0]*n for el in range(n)] ks=[] for cuad in range(randint(5,2*n)): ki=randint(2,n/4+1) if ki%2==1: ki+=rand...
[ [ 1, 0, 0.0333, 0.0333, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 2, 0, 0.1167, 0.0667, 0, 0.66, 0.25, 184, 0, 1, 1, 0, 0, 0, 3 ], [ 13, 1, 0.1333, 0.0333, 1, 0.4...
[ "from random import randint", "def mprint(m):\n\treturn '\\n'.join(map(lambda x:''.join([el and '#' or '_' for el in x]),m))", "\treturn '\\n'.join(map(lambda x:''.join([el and '#' or '_' for el in x]),m))", "fout=open('test_sanos.in','w')", "for n in range(6,40):\n\tfor caso in range(10):\n\t\tM=[[0]*n for...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt seed(123) # defino el seed para hacer el experimento reproducible def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIP...
[ [ 1, 0, 0.0179, 0.0179, 0, 0.66, 0, 588, 0, 2, 0, 0, 588, 0, 0 ], [ 1, 0, 0.0357, 0.0179, 0, 0.66, 0.125, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0536, 0.0179, 0, 0...
[ "import getopt,sys", "import subprocess", "from random import random,randint,seed", "from math import sqrt", "def runtest(li,args):\n\t# abro ./domino con parametros args\n\tfp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE)\n\tfor caso,p in li:\n\t\tfp.stdin.w...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for caso,p in li: fp.stdin.write(str(l...
[ [ 1, 0, 0.0244, 0.0244, 0, 0.66, 0, 588, 0, 2, 0, 0, 588, 0, 0 ], [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, ...
[ "import getopt,sys", "import subprocess", "from random import random,randint,seed", "from math import sqrt", "def runtest(li,args):\n\t# abro ./domino con parametros args\n\tfp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE)\n\tfor caso,p in li:\n\t\tfp.stdin.w...
from math import cos,pi,sqrt def pretty(m): #funcion que imprime una matriz print '\n'.join([' '.join(map(str,line)) for line in m]) def productoria(li): return reduce(lambda x,y:x*y, li, 1) def sano(n): #algoritmo magico :D return int(round(productoria([sqrt(sqrt(4*cos(pi*j/(n+1))**2+4*cos(pi*k/(n+1))**2)) for...
[ [ 1, 0, 0.0139, 0.0139, 0, 0.66, 0, 526, 0, 3, 0, 0, 526, 0, 0 ], [ 2, 0, 0.0556, 0.0417, 0, 0.66, 0.2, 369, 0, 1, 0, 0, 0, 0, 4 ], [ 8, 1, 0.0694, 0.0139, 1, 0.75,...
[ "from math import cos,pi,sqrt", "def pretty(m):\n\t#funcion que imprime una matriz\n\tprint('\\n'.join([' '.join(map(str,line)) for line in m]))", "\tprint('\\n'.join([' '.join(map(str,line)) for line in m]))", "def productoria(li):\n\treturn reduce(lambda x,y:x*y, li, 1)", "\treturn reduce(lambda x,y:x*y, ...
#!/usr/bin/env python import getopt,sys import subprocess from random import random,randint,seed from math import sqrt def runtest(li,args): # abro ./domino con parametros args fp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for caso,p in li: fp.stdin.write(str(l...
[ [ 1, 0, 0.0244, 0.0244, 0, 0.66, 0, 588, 0, 2, 0, 0, 588, 0, 0 ], [ 1, 0, 0.0488, 0.0244, 0, 0.66, 0.1429, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.0732, 0.0244, 0, ...
[ "import getopt,sys", "import subprocess", "from random import random,randint,seed", "from math import sqrt", "def runtest(li,args):\n\t# abro ./domino con parametros args\n\tfp=subprocess.Popen(['./domino']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE)\n\tfor caso,p in li:\n\t\tfp.stdin.w...
#!/usr/bin/env python import getopt,sys import subprocess from random import randint,seed from math import sqrt def runtest(li,args): # abro ./amigos con parametros: time 0.1 3 fp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for i in li: fp.stdin.write(str(le...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 588, 0, 2, 0, 0, 588, 0, 0 ], [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0.2, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1429, 0.0476, 0, 0.6...
[ "import getopt,sys", "import subprocess", "from random import randint,seed", "from math import sqrt", "def runtest(li,args):\n\t# abro ./amigos con parametros: time 0.1 3\n\tfp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE)\n\tfor i in li:\n\t\tfp.stdin.wr...
f=open('Tp1Ej1.in') while True: li=map(float,f.readline().rsplit()) if li[0]<0: break li.pop(0) li.sort() mi,count=li.pop(0)+1,1 for x in li: if x>mi: count+=1 mi=x+1 print count
[ [ 14, 0, 0.0833, 0.0833, 0, 0.66, 0, 899, 3, 1, 0, 0, 693, 10, 1 ], [ 5, 0, 0.5833, 0.9167, 0, 0.66, 1, 0, 1, 0, 0, 0, 0, 0, 7 ], [ 14, 1, 0.25, 0.0833, 1, 0.89, ...
[ "f=open('Tp1Ej1.in')", "while True:\n\tli=map(float,f.readline().rsplit())\n\tif li[0]<0: break\n\tli.pop(0)\n\tli.sort()\n\tmi,count=li.pop(0)+1,1\n\tfor x in li:\n\t\tif x>mi:", "\tli=map(float,f.readline().rsplit())", "\tif li[0]<0: break", "\tli.pop(0)", "\tli.sort()", "\tmi,count=li.pop(0)+1,1", ...
#!/usr/bin/env python import getopt,sys import subprocess from random import randint,seed from math import sqrt def runtest(li,args): # abro ./amigos con parametros: time 0.1 3 fp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE) for i in li: fp.stdin.write(str(le...
[ [ 1, 0, 0.0476, 0.0476, 0, 0.66, 0, 588, 0, 2, 0, 0, 588, 0, 0 ], [ 1, 0, 0.0952, 0.0476, 0, 0.66, 0.2, 394, 0, 1, 0, 0, 394, 0, 0 ], [ 1, 0, 0.1429, 0.0476, 0, 0.6...
[ "import getopt,sys", "import subprocess", "from random import randint,seed", "from math import sqrt", "def runtest(li,args):\n\t# abro ./amigos con parametros: time 0.1 3\n\tfp=subprocess.Popen(['./intervalos']+args, shell=False, stdin=subprocess.PIPE,stdout=subprocess.PIPE)\n\tfor i in li:\n\t\tfp.stdin.wr...
# This file is an introductory example to # the python language of programmation. import numpy as np; def power(x,n): """ The function "power" takes two arguments : x is a real number n is an integer and returns the value y = x^n""" if (n == 0): y = 1; elif (n == 1): y =...
[ [ 1, 0, 0.037, 0.0123, 0, 0.66, 0, 954, 0, 1, 0, 0, 954, 0, 0 ], [ 2, 0, 0.1605, 0.2099, 0, 0.66, 0.1, 632, 0, 2, 1, 0, 0, 0, 2 ], [ 8, 1, 0.0926, 0.0494, 1, 0.54, ...
[ "import numpy as np;", "def power(x,n):\n \"\"\" The function \"power\" takes two arguments : \n x is a real number\n n is an integer\n and returns the value y = x^n\"\"\"\n \n if (n == 0):\n y = 1;", " \"\"\" The function \"power\" takes two arguments : \n x is a real number\n ...
#Ceci est un commentaire en python. #Début du fichier.
[]
[]
# This is Python example on how to use Mongoose embeddable web server, # http://code.google.com/p/mongoose # # Before using the mongoose module, make sure that Mongoose shared library is # built and present in the current (or system library) directory import mongoose import sys # Handle /show and /form URIs. def Even...
[ [ 1, 0, 0.1129, 0.0161, 0, 0.66, 0, 755, 0, 1, 0, 0, 755, 0, 0 ], [ 1, 0, 0.129, 0.0161, 0, 0.66, 0.1667, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 2, 0, 0.4597, 0.5806, 0, 0...
[ "import mongoose", "import sys", "def EventHandler(event, conn, info):\n if event == mongoose.HTTP_ERROR:\n conn.printf('%s', 'HTTP/1.0 200 OK\\r\\n')\n conn.printf('%s', 'Content-Type: text/plain\\r\\n\\r\\n')\n conn.printf('HTTP error: %d\\n', info.status_code)\n return True\n ...
# Copyright (c) 2004-2009 Sergey Lyubka # # 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, publ...
[ [ 8, 0, 0.1855, 0.0881, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.2453, 0.0063, 0, 0.66, 0.0909, 182, 0, 1, 0, 0, 182, 0, 0 ], [ 1, 0, 0.2516, 0.0063, 0, 0.66...
[ "\"\"\"\nThis module provides python binding for the Mongoose web server.\n\nThere are two classes defined:\n\n Connection: - wraps all functions that accept struct mg_connection pointer\n as first argument.", "import ctypes", "import os", "NEW_REQUEST = 0", "HTTP_ERROR = 1", "EVENT_LOG = 2", "INIT_...
#!/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\...
# -*- coding: utf-8 -*- # # jQuery File Upload Plugin GAE Python Example 2.0 # https://github.com/blueimp/jQuery-File-Upload # # Copyright 2011, Sebastian Tschan # https://blueimp.net # # Licensed under the MIT license: # http://www.opensource.org/licenses/MIT # from __future__ import with_statement from google.appeng...
[ [ 1, 0, 0.0867, 0.0067, 0, 0.66, 0, 777, 0, 1, 0, 0, 777, 0, 0 ], [ 1, 0, 0.0933, 0.0067, 0, 0.66, 0.0667, 279, 0, 2, 0, 0, 279, 0, 0 ], [ 1, 0, 0.1, 0.0067, 0, 0.6...
[ "from __future__ import with_statement", "from google.appengine.api import files, images", "from google.appengine.ext import blobstore, deferred", "from google.appengine.ext.webapp import blobstore_handlers", "import json, re, urllib, webapp2", "WEBSITE = 'http://blueimp.github.com/jQuery-File-Upload/'", ...
''' Module which prompts the user for translations and saves them. TODO: implement @author: Rodrigo Damazio ''' class Translator(object): ''' classdocs ''' def __init__(self, language): ''' Constructor ''' self._language = language def Translate(self, string_names): print string_names
[ [ 8, 0, 0.1905, 0.3333, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 3, 0, 0.7143, 0.619, 0, 0.66, 1, 229, 0, 2, 0, 0, 186, 0, 1 ], [ 8, 1, 0.5238, 0.1429, 1, 0.29, ...
[ "'''\nModule which prompts the user for translations and saves them.\n\nTODO: implement\n\n@author: Rodrigo Damazio\n'''", "class Translator(object):\n '''\n classdocs\n '''\n\n def __init__(self, language):\n '''\n Constructor", " '''\n classdocs\n '''", " def __init__(self, language):\n '''...
''' Module which brings history information about files from Mercurial. @author: Rodrigo Damazio ''' import re import subprocess REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*') def _GetOutputLines(args): ''' Runs an external process and returns its output as a list of lines. @param args: the argume...
[ [ 8, 0, 0.0319, 0.0532, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0745, 0.0106, 0, 0.66, 0.1429, 540, 0, 1, 0, 0, 540, 0, 0 ], [ 1, 0, 0.0851, 0.0106, 0, 0.66...
[ "'''\nModule which brings history information about files from Mercurial.\n\n@author: Rodrigo Damazio\n'''", "import re", "import subprocess", "REVISION_REGEX = re.compile(r'(?P<hash>[0-9a-f]{12}):.*')", "def _GetOutputLines(args):\n '''\n Runs an external process and returns its output as a list of lines...
''' Module which parses a string XML file. @author: Rodrigo Damazio ''' from xml.parsers.expat import ParserCreate import re #import xml.etree.ElementTree as ET class StringsParser(object): ''' Parser for string XML files. This object is not thread-safe and should be used for parsing a single file at a time...
[ [ 8, 0, 0.0261, 0.0435, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0609, 0.0087, 0, 0.66, 0.3333, 573, 0, 1, 0, 0, 573, 0, 0 ], [ 1, 0, 0.0696, 0.0087, 0, 0.66...
[ "'''\nModule which parses a string XML file.\n\n@author: Rodrigo Damazio\n'''", "from xml.parsers.expat import ParserCreate", "import re", "class StringsParser(object):\n '''\n Parser for string XML files.\n\n This object is not thread-safe and should be used for parsing a single file at\n a time, only.\n...
#!/usr/bin/python ''' Entry point for My Tracks i18n tool. @author: Rodrigo Damazio ''' import mytracks.files import mytracks.translate import mytracks.validate import sys def Usage(): print 'Usage: %s <command> [<language> ...]\n' % sys.argv[0] print 'Commands are:' print ' cleanup' print ' translate' p...
[ [ 8, 0, 0.0417, 0.0521, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0833, 0.0104, 0, 0.66, 0.125, 640, 0, 1, 0, 0, 640, 0, 0 ], [ 1, 0, 0.0938, 0.0104, 0, 0.66,...
[ "'''\nEntry point for My Tracks i18n tool.\n\n@author: Rodrigo Damazio\n'''", "import mytracks.files", "import mytracks.translate", "import mytracks.validate", "import sys", "def Usage():\n print('Usage: %s <command> [<language> ...]\\n' % sys.argv[0])\n print('Commands are:')\n print(' cleanup')\n p...
''' Module which compares languague files to the master file and detects issues. @author: Rodrigo Damazio ''' import os from mytracks.parser import StringsParser import mytracks.history class Validator(object): def __init__(self, languages): ''' Builds a strings file validator. Params: @para...
[ [ 8, 0, 0.0304, 0.0522, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.0696, 0.0087, 0, 0.66, 0.25, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 1, 0, 0.0783, 0.0087, 0, 0.66, ...
[ "'''\nModule which compares languague files to the master file and detects\nissues.\n\n@author: Rodrigo Damazio\n'''", "import os", "from mytracks.parser import StringsParser", "import mytracks.history", "class Validator(object):\n\n def __init__(self, languages):\n '''\n Builds a strings file valida...
''' Module for dealing with resource files (but not their contents). @author: Rodrigo Damazio ''' import os.path from glob import glob import re MYTRACKS_RES_DIR = 'MyTracks/res' ANDROID_MASTER_VALUES = 'values' ANDROID_VALUES_MASK = 'values-*' def GetMyTracksDir(): ''' Returns the directory in which the MyTrac...
[ [ 8, 0, 0.0667, 0.1111, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1333, 0.0222, 0, 0.66, 0.125, 79, 0, 1, 0, 0, 79, 0, 0 ], [ 1, 0, 0.1556, 0.0222, 0, 0.66, ...
[ "'''\nModule for dealing with resource files (but not their contents).\n\n@author: Rodrigo Damazio\n'''", "import os.path", "from glob import glob", "import re", "MYTRACKS_RES_DIR = 'MyTracks/res'", "ANDROID_MASTER_VALUES = 'values'", "ANDROID_VALUES_MASK = 'values-*'", "def GetMyTracksDir():\n '''\n...
import urllib, urllib.request, io, os, sys, re url = "http://music.baidu.com/search/lrc" search = [('key','蒙娜丽莎的眼泪')] url_String = url + "?" + urllib.parse.urlencode(search) print(url_String) req = urllib.request.Request(url_String) fd = urllib.request.urlopen(req) print(fd) xx = fd.read() yy = xx.decode().spl...
[ [ 1, 0, 0.0417, 0.0417, 0, 0.66, 0, 614, 0, 6, 0, 0, 614, 0, 0 ], [ 14, 0, 0.0833, 0.0417, 0, 0.66, 0.0909, 789, 1, 0, 0, 0, 0, 3, 0 ], [ 14, 0, 0.125, 0.0417, 0, 0...
[ "import urllib, urllib.request, io, os, sys, re", "url = \"http://music.baidu.com/search/lrc\"", "search = [('key','蒙娜丽莎的眼泪')]", "url_String = url + \"?\" + urllib.parse.urlencode(search)", "print(url_String)", "req = urllib.request.Request(url_String)", "fd = urllib.request.urlopen(req)", "print(fd)"...
import random print 200 letras = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] for i in range(501,701): x=random.randint(0,len(letras)-1) s="" for j in range(i): s+=str(letras[(x+j) % len(letras)]) print "*",s ...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 8, 0, 0.1538, 0.0769, 0, 0.66, 0.3333, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.3077, 0.0769, 0, 0...
[ "import random", "print(200)", "letras = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']", "for i in range(501,701):\n x=random.randint(0,len(letras)-1)\n s=\"\"\n for j in range(i):\n s+=str(letras[(x+j) % len(letras)])\n print(\"*\...
import random print 500 letras = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] for i in range(999501,1000001): x=random.randint(0,len(letras)-1) s="" for j in range(i): s+=str(letras[(x+j) % len(letras)]) print s ...
[ [ 1, 0, 0.0769, 0.0769, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 8, 0, 0.1538, 0.0769, 0, 0.66, 0.3333, 535, 3, 1, 0, 0, 0, 0, 1 ], [ 14, 0, 0.3077, 0.0769, 0, 0...
[ "import random", "print(500)", "letras = ['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']", "for i in range(999501,1000001):\n x=random.randint(0,len(letras)-1)\n s=\"\"\n for j in range(i):\n s+=str(letras[(x+j) % len(letras)])\n pri...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class GrafoCircular: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 202, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.29, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.68, ...
[ "class GrafoCircular:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class GrafoCircular: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 202, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.48, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.16, ...
[ "class GrafoCircular:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class Grafo: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) for ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 330, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.03, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.63, ...
[ "class Grafo:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdo...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from grafo import Grafo from sets import Set import os import random def ordenar(t): if t[0] < t[1]: return t else: return (t[1],t[0]) def generarInstancia(ciudades=10, acuerdos=None): if acuerdos is None: acuerdos = random.randint(1...
[ [ 1, 0, 0.0519, 0.013, 0, 0.66, 0, 503, 0, 1, 0, 0, 503, 0, 0 ], [ 1, 0, 0.0779, 0.013, 0, 0.66, 0.1111, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.0909, 0.013, 0, 0.6...
[ "from grafo import Grafo", "from sets import Set", "import os", "import random", "def ordenar(t):\n if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " return t", " return (t[1],t[...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from grafo import Grafo from sets import Set import os import random def ordenar(t): if t[0] < t[1]: return t else: return (t[1],t[0]) def generarInstancia(ciudades=10, acuerdos=None): if acuerdos is None: acuerdos = random.randint(1...
[ [ 1, 0, 0.0519, 0.013, 0, 0.66, 0, 503, 0, 1, 0, 0, 503, 0, 0 ], [ 1, 0, 0.0779, 0.013, 0, 0.66, 0.1111, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.0909, 0.013, 0, 0.6...
[ "from grafo import Grafo", "from sets import Set", "import os", "import random", "def ordenar(t):\n if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " return t", " return (t[1],t[...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class Grafo: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) for ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 330, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.13, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.53, ...
[ "class Grafo:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdo...
############################################################################# valor=[] num = 0 visitado = [] fuerte = [] ############################################################################# # grafo sobre listas de adyacencia # FIXME: a las 5 a.m me parecio re coherente que si llegan se llamen out # y s...
[ [ 14, 0, 0.0133, 0.0067, 0, 0.66, 0, 580, 0, 0, 0, 0, 0, 5, 0 ], [ 14, 0, 0.02, 0.0067, 0, 0.66, 0.04, 328, 1, 0, 0, 0, 0, 1, 0 ], [ 14, 0, 0.0267, 0.0067, 0, 0.66,...
[ "valor=[]", "num = 0", "visitado = []", "fuerte = []", "class Grafo:\n def __init__(self,nodos, relacion):\n self.nodos = nodos\n self.verticesIn = [[] for x in range(nodos)]\n self.verticesOut = [[] for x in range(nodos)]\n for each in relacion:\n self.verticesIn[e...
import random import psyco psyco.full() class Grafo: def __init__(self,nodos, relacion): self.nodos = nodos self.verticesIn = [[] for x in range(nodos)] self.verticesOut = [[] for x in range(nodos)] for each in relacion: self.verticesIn[each[0]].append(each[1]) ...
[ [ 1, 0, 0.0125, 0.0125, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.025, 0.0125, 0, 0.66, 0.1111, 17, 0, 1, 0, 0, 17, 0, 0 ], [ 8, 0, 0.0375, 0.0125, 0, 0.6...
[ "import random", "import psyco", "psyco.full()", "class Grafo:\n def __init__(self,nodos, relacion):\n self.nodos = nodos\n self.verticesIn = [[] for x in range(nodos)]\n self.verticesOut = [[] for x in range(nodos)]\n for each in relacion:\n self.verticesIn[each[0]]....
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class GrafoCircular: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 202, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.06, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.32, ...
[ "class GrafoCircular:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- class GrafoCircular: def __init__(self,n,acuerdos): self.n = n self.lista_acuerdos = acuerdos # creo la matriz de acuerdos self.acuerdos = [] for i in range(n): self.acuerdos.append([0]*n) ...
[ [ 3, 0, 0.5714, 0.8929, 0, 0.66, 0, 202, 0, 3, 0, 0, 0, 0, 5 ], [ 2, 1, 0.4643, 0.6071, 1, 0.49, 0, 555, 0, 3, 0, 0, 0, 0, 4 ], [ 14, 2, 0.2143, 0.0357, 2, 0.43, ...
[ "class GrafoCircular:\n def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de acuerdos\n self.acuerdos = []", " def __init__(self,n,acuerdos):\n self.n = n\n self.lista_acuerdos = acuerdos\n\n # creo la matriz de...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from grafocircular import GrafoCircular from sets import Set import random ################################################################# # Generador de instancias de barcos y ciudades # ################################################################...
[ [ 1, 0, 0.1212, 0.0303, 0, 0.66, 0, 295, 0, 1, 0, 0, 295, 0, 0 ], [ 1, 0, 0.1515, 0.0303, 0, 0.66, 0.2, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.1818, 0.0303, 0, 0.6...
[ "from grafocircular import GrafoCircular", "from sets import Set", "import random", "def ordenar(t):\n if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " return t", " return (t[1],t...
#!/usr/bin/python # -*- coding: iso-8859-1 -*- from grafocircular import GrafoCircular from sets import Set import random ################################################################# # Generador de instancias de barcos y ciudades # ################################################################...
[ [ 1, 0, 0.1212, 0.0303, 0, 0.66, 0, 295, 0, 1, 0, 0, 295, 0, 0 ], [ 1, 0, 0.1515, 0.0303, 0, 0.66, 0.2, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.1818, 0.0303, 0, 0.6...
[ "from grafocircular import GrafoCircular", "from sets import Set", "import random", "def ordenar(t):\n if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " if t[0] < t[1]:\n return t\n else:\n return (t[1],t[0])", " return t", " return (t[1],t...
#!/usr/bin/env python """ svg.py - Construct/display SVG scenes. The following code is a lightweight wrapper around SVG files. The metaphor is to construct a scene, add objects to it, and then write it to a file to display it. This program uses ImageMagick to display the SVG files. ImageMagick also does a remarkable...
[ [ 8, 0, 0.0542, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1083, 0.0083, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1167, 0.0083, 0, 0.66, ...
[ "\"\"\"\nsvg.py - Construct/display SVG scenes.\n\nThe following code is a lightweight wrapper around SVG files. The metaphor\nis to construct a scene, add objects to it, and then write it to a file\nto display it.\n\nThis program uses ImageMagick to display the SVG files. ImageMagick also", "import os", "displ...
from GrafoBipartito import * from GeneradorGrafos import * from Dibujador import * # grafo: todos los nodos y ejes, p1 p2 estaRel(v,u) #dibujo: l1, l2 los nodos que no se pueden mover class HeuristicaInsercionEjes (ResolvedorConstructivo): # establece el rango en el cual se puede insertar un nodo #...
[ [ 1, 0, 0.0065, 0.0065, 0, 0.66, 0, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0131, 0.0065, 0, 0.66, 0.3333, 590, 0, 1, 0, 0, 590, 0, 0 ], [ 1, 0, 0.0196, 0.0065, 0, 0....
[ "from GrafoBipartito import *", "from GeneradorGrafos import *", "from Dibujador import *", "class HeuristicaInsercionEjes (ResolvedorConstructivo):\n \n # establece el rango en el cual se puede insertar un nodo\n # basicamente me fijo que si el tipo esta marcado, no lo trate de poner\n # ...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo class ResolvedorBasico(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.dibujo # busco los nodos que quedan por posicionar ...
[ [ 1, 0, 0.0526, 0.0132, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1184, 0.0132, 0, 0.66, 0.25, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 3, 0, 0.4605, 0.6447, 0, 0.66...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "class ResolvedorBasico(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por posicionar\n q1 = [x for x in g.p1 if not x in self.dibujo.l...
# Heuristica de agregar nodos de a uno y a acomodarlos from GrafoBipartito import ResolvedorConstructivo, Dibujo from Dibujador import DibujadorGrafoBipartito from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio class HeuristicaInsercionNodosPrimero(ResolvedorConstructivo): def resolv...
[ [ 1, 0, 0.0215, 0.0108, 0, 0.66, 0, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0323, 0.0108, 0, 0.66, 0.25, 851, 0, 1, 0, 0, 851, 0, 0 ], [ 1, 0, 0.043, 0.0108, 0, 0.66,...
[ "from GrafoBipartito import ResolvedorConstructivo, Dibujo", "from Dibujador import DibujadorGrafoBipartito", "from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio", "class HeuristicaInsercionNodosPrimero(ResolvedorConstructivo):\n def resolver(self):\n d = self.dibujo\...
import random from HeuristicaInsercionEjes import * import psyco from psyco import * class BusquedaLocalReInsercion(BusquedaLocal): def _rango(self,x,pi,marcados): if x not in marcados: return range(len(pi)+1) else: posxMarcado = marcados.index(x) ...
[ [ 1, 0, 0.0083, 0.0083, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0165, 0.0083, 0, 0.66, 0.2, 287, 0, 1, 0, 0, 287, 0, 0 ], [ 1, 0, 0.0248, 0.0083, 0, 0.6...
[ "import random", "from HeuristicaInsercionEjes import *", "import psyco", "from psyco import *", "class BusquedaLocalReInsercion(BusquedaLocal):\n def _rango(self,x,pi,marcados):\n if x not in marcados:\n return range(len(pi)+1)\n else:\n posxMarcado = marcados.index...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from HeuristicaInsercionEjes import * #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorSwapperConPoda(ResolvedorConstructivo): def resolver(self): ...
[ [ 1, 0, 0.0357, 0.0089, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0446, 0.0089, 0, 0.66, 0.1667, 287, 0, 1, 0, 0, 287, 0, 0 ], [ 1, 0, 0.0804, 0.0089, 0, ...
[ "import sys", "from HeuristicaInsercionEjes import *", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorSwapperConPoda(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\...
import random from HeuristicaInsercionEjes import * from HeuristicaInsercionNodosMayorGrado import * import psyco psyco.full() class BusquedaLocalIntercambioGreedy(BusquedaLocal): def swapValido(self,i,j,l,marcados): if i in marcados: if j in marcados: return Fal...
[ [ 1, 0, 0.0082, 0.0082, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0246, 0.0082, 0, 0.66, 0.1667, 287, 0, 1, 0, 0, 287, 0, 0 ], [ 1, 0, 0.0328, 0.0082, 0, ...
[ "import random", "from HeuristicaInsercionEjes import *", "from HeuristicaInsercionNodosMayorGrado import *", "import psyco", "psyco.full()", "class BusquedaLocalIntercambioGreedy(BusquedaLocal):\n \n def swapValido(self,i,j,l,marcados):\n if i in marcados:\n if j in marcados:\n ...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo class ResolvedorSwapper(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.dibujo # busco los nodos que quedan por posicionar ...
[ [ 1, 0, 0.0396, 0.0099, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0891, 0.0099, 0, 0.66, 0.25, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 3, 0, 0.4653, 0.7228, 0, 0.66...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "class ResolvedorSwapper(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por posicionar\n q1 = [x for x in g.p1 if not x in self.dibujo....
#!/usr/bin/python # -*- coding: utf-8 -*- from sets import Set import svg from GrafoBipartito import GrafoBipartito, Dibujo class DibujadorGrafoBipartito: def __init__(self, dibujo, nombre="GrafoBipartito", height=800,marcados1=None,marcados2=None): self.dibujo = dibujo # calculo las dimensiones...
[ [ 1, 0, 0.0312, 0.0078, 0, 0.66, 0, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.0469, 0.0078, 0, 0.66, 0.2, 873, 0, 1, 0, 0, 873, 0, 0 ], [ 1, 0, 0.0547, 0.0078, 0, 0.6...
[ "from sets import Set", "import svg", "from GrafoBipartito import GrafoBipartito, Dibujo", "class DibujadorGrafoBipartito:\n def __init__(self, dibujo, nombre=\"GrafoBipartito\", height=800,marcados1=None,marcados2=None):\n self.dibujo = dibujo\n\n # calculo las dimensiones\n self.alto...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorBasicoConPoda(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.di...
[ [ 1, 0, 0.0444, 0.0111, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1, 0.0111, 0, 0.66, 0.2, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.1111, 0.0111, 0, 0.66, ...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorBasicoConPoda(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por po...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo class ResolvedorSwapper(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.dibujo # busco los nodos que quedan por posicionar ...
[ [ 1, 0, 0.0396, 0.0099, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0891, 0.0099, 0, 0.66, 0.25, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 3, 0, 0.4653, 0.7228, 0, 0.66...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "class ResolvedorSwapper(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por posicionar\n q1 = [x for x in g.p1 if not x in self.dibujo....
#!/usr/bin/python # -*- coding: utf-8 -*- import sys from HeuristicaInsercionEjes import * #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorSwapperConPoda(ResolvedorConstructivo): def resolver(self): ...
[ [ 1, 0, 0.0357, 0.0089, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0446, 0.0089, 0, 0.66, 0.1667, 287, 0, 1, 0, 0, 287, 0, 0 ], [ 1, 0, 0.0804, 0.0089, 0, ...
[ "import sys", "from HeuristicaInsercionEjes import *", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorSwapperConPoda(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\...
#!/usr/bin/python # -*- coding: utf-8 -*- from GrafoBipartito import Dibujo, ResolvedorConstructivo import sys #import psyco #psyco.full() class ResolvedorFuerzaBruta(ResolvedorConstructivo): def resolver(self): # busco los nodos que quedan por posicionar q1 = [x for x in self.dibujo.g.p1 if not...
[ [ 1, 0, 0.0301, 0.0075, 0, 0.66, 0, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0451, 0.0075, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 3, 0, 0.188, 0.218, 0, 0.66,...
[ "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "import sys", "class ResolvedorFuerzaBruta(ResolvedorConstructivo):\n def resolver(self):\n # busco los nodos que quedan por posicionar\n q1 = [x for x in self.dibujo.g.p1 if not x in self.dibujo.l1]\n q2 = [x for x in self.dib...
#!/usr/bin/python # -*- coding: utf-8 -*- from GrafoBipartito import ResolvedorConstructivo, Dibujo from GrafoBipartito import crucesEntre, crucesPorAgregarAtras from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio import random class HeuristicaInsercionNodos(ResolvedorConstructivo): ...
[ [ 1, 0, 0.0174, 0.0043, 0, 0.66, 0, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0217, 0.0043, 0, 0.66, 0.1667, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0261, 0.0043, 0, 0.66...
[ "from GrafoBipartito import ResolvedorConstructivo, Dibujo", "from GrafoBipartito import crucesEntre, crucesPorAgregarAtras", "from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio", "import random", "class HeuristicaInsercionNodos(ResolvedorConstructivo):\n\n ###############...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras from SolucionFuerzaBruta import cuantasCombinaciones, tamArbol class ResolvedorSwapperTa...
[ [ 1, 0, 0.0109, 0.0027, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0245, 0.0027, 0, 0.66, 0.1667, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0272, 0.0027, 0, 0....
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras", "from SolucionFuerzaBruta import cuantasCombinaciones, tamArbol", "class ResolvedorSwapperTablaConPoda(ResolvedorConstructivo):\n\n #######...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorSwapperTabla(Resolv...
[ [ 1, 0, 0.0129, 0.0032, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.029, 0.0032, 0, 0.66, 0.1667, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0323, 0.0032, 0, 0.6...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorSwapperTabla(ResolvedorConstructivo):\n\n ########################...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo class ResolvedorBasico(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.dibujo # busco los nodos que quedan por posicionar ...
[ [ 1, 0, 0.0526, 0.0132, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1184, 0.0132, 0, 0.66, 0.25, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 3, 0, 0.4605, 0.6447, 0, 0.66...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "class ResolvedorBasico(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por posicionar\n q1 = [x for x in g.p1 if not x in self.dibujo.l...
#!/usr/bin/env python """ svg.py - Construct/display SVG scenes. The following code is a lightweight wrapper around SVG files. The metaphor is to construct a scene, add objects to it, and then write it to a file to display it. This program uses ImageMagick to display the SVG files. ImageMagick also does a remarkable...
[ [ 8, 0, 0.0542, 0.0833, 0, 0.66, 0, 0, 1, 0, 0, 0, 0, 0, 0 ], [ 1, 0, 0.1083, 0.0083, 0, 0.66, 0.1, 688, 0, 1, 0, 0, 688, 0, 0 ], [ 14, 0, 0.1167, 0.0083, 0, 0.66, ...
[ "\"\"\"\nsvg.py - Construct/display SVG scenes.\n\nThe following code is a lightweight wrapper around SVG files. The metaphor\nis to construct a scene, add objects to it, and then write it to a file\nto display it.\n\nThis program uses ImageMagick to display the SVG files. ImageMagick also", "import os", "displ...
from GrafoBipartito import * from GeneradorGrafos import * from Dibujador import * from SolucionBasicaPoda import * from HeuristicaInsercionEjes import * import random # grafo: todos los nodos y ejes, p1 p2 estaRel(v,u) #dibujo: l1, l2 los nodos que no se pueden mover class HeuristicaDeLaMediana (ResolvedorCons...
[ [ 1, 0, 0.0051, 0.0051, 0, 0.66, 0, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0101, 0.0051, 0, 0.66, 0.1429, 590, 0, 1, 0, 0, 590, 0, 0 ], [ 1, 0, 0.0152, 0.0051, 0, 0....
[ "from GrafoBipartito import *", "from GeneradorGrafos import *", "from Dibujador import *", "from SolucionBasicaPoda import *", "from HeuristicaInsercionEjes import *", "import random", "class HeuristicaDeLaMediana (ResolvedorConstructivo):\n #no es la version del paper pero para la mediana, aca part...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorBasicoConPoda(ResolvedorConstructivo): def resolver(self): g = self.dibujo.g d = self.di...
[ [ 1, 0, 0.0444, 0.0111, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.1, 0.0111, 0, 0.66, 0.2, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.1111, 0.0111, 0, 0.66, ...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorBasicoConPoda(ResolvedorConstructivo):\n def resolver(self):\n g = self.dibujo.g\n d = self.dibujo\n\n # busco los nodos que quedan por po...
from BusquedaLocalIntercambioGreedy import * from BusquedaLocalReInsercion import * from HeuristicaInsercionEjes import * class BusquedaLocalMix(BusquedaLocal): def hallarMinimoLocal(self,dibujo,marcados1,marcados2,losEjesDe): crucesInicial = contadorDeCruces(dibujo.l1,dibujo.l2,losEjesDe) c...
[ [ 1, 0, 0.0222, 0.0222, 0, 0.66, 0, 170, 0, 1, 0, 0, 170, 0, 0 ], [ 1, 0, 0.0444, 0.0222, 0, 0.66, 0.25, 934, 0, 1, 0, 0, 934, 0, 0 ], [ 1, 0, 0.0667, 0.0222, 0, 0....
[ "from BusquedaLocalIntercambioGreedy import *", "from BusquedaLocalReInsercion import *", "from HeuristicaInsercionEjes import *", "class BusquedaLocalMix(BusquedaLocal):\n def hallarMinimoLocal(self,dibujo,marcados1,marcados2,losEjesDe):\n crucesInicial = contadorDeCruces(dibujo.l1,dibujo.l2,losEje...
#!/usr/bin/python # -*- coding: utf-8 -*- from GrafoBipartito import Dibujo, ResolvedorConstructivo import sys #import psyco #psyco.full() class ResolvedorFuerzaBruta(ResolvedorConstructivo): def resolver(self): # busco los nodos que quedan por posicionar q1 = [x for x in self.dibujo.g.p1 if not...
[ [ 1, 0, 0.0301, 0.0075, 0, 0.66, 0, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0451, 0.0075, 0, 0.66, 0.125, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 3, 0, 0.188, 0.218, 0, 0.66,...
[ "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "import sys", "class ResolvedorFuerzaBruta(ResolvedorConstructivo):\n def resolver(self):\n # busco los nodos que quedan por posicionar\n q1 = [x for x in self.dibujo.g.p1 if not x in self.dibujo.l1]\n q2 = [x for x in self.dib...
import random from HeuristicaDeLaMediana import * import psyco psyco.full() class BusquedaLocalMediana(BusquedaLocal): def calcularMediana(self,each,indicesi,losEjesDe): med = [] for each1 in losEjesDe[each]: med.append(indicesi[each1]) med.sort() if med == []...
[ [ 1, 0, 0.0065, 0.0065, 0, 0.66, 0, 715, 0, 1, 0, 0, 715, 0, 0 ], [ 1, 0, 0.0129, 0.0065, 0, 0.66, 0.2, 580, 0, 1, 0, 0, 580, 0, 0 ], [ 1, 0, 0.0194, 0.0065, 0, 0.6...
[ "import random", "from HeuristicaDeLaMediana import *", "import psyco", "psyco.full()", "class BusquedaLocalMediana(BusquedaLocal):\n def calcularMediana(self,each,indicesi,losEjesDe):\n med = []\n for each1 in losEjesDe[each]:\n med.append(indicesi[each1])\n med.sort()\n ...
#!/usr/bin/python # -*- coding: utf-8 -*- from sets import Set import svg from GrafoBipartito import GrafoBipartito, Dibujo class DibujadorGrafoBipartito: def __init__(self, dibujo, nombre="GrafoBipartito", height=800,marcados1=None,marcados2=None): self.dibujo = dibujo # calculo las dimensiones...
[ [ 1, 0, 0.0312, 0.0078, 0, 0.66, 0, 842, 0, 1, 0, 0, 842, 0, 0 ], [ 1, 0, 0.0469, 0.0078, 0, 0.66, 0.2, 873, 0, 1, 0, 0, 873, 0, 0 ], [ 1, 0, 0.0547, 0.0078, 0, 0.6...
[ "from sets import Set", "import svg", "from GrafoBipartito import GrafoBipartito, Dibujo", "class DibujadorGrafoBipartito:\n def __init__(self, dibujo, nombre=\"GrafoBipartito\", height=800,marcados1=None,marcados2=None):\n self.dibujo = dibujo\n\n # calculo las dimensiones\n self.alto...
# Heuristica de agregar nodos de a uno y a acomodarlos from GrafoBipartito import ResolvedorConstructivo, Dibujo, GrafoBipartito from Dibujador import DibujadorGrafoBipartito from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio from sets import * class HeuristicaInsercionNodosMenorGrado(Re...
[ [ 1, 0, 0.018, 0.009, 0, 0.66, 0, 16, 0, 3, 0, 0, 16, 0, 0 ], [ 1, 0, 0.027, 0.009, 0, 0.66, 0.2, 851, 0, 1, 0, 0, 851, 0, 0 ], [ 1, 0, 0.036, 0.009, 0, 0.66, 0...
[ "from GrafoBipartito import ResolvedorConstructivo, Dibujo, GrafoBipartito", "from Dibujador import DibujadorGrafoBipartito", "from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio", "from sets import *", "class HeuristicaInsercionNodosMenorGrado(ResolvedorConstructivo):\n de...
from GrafoBipartito import * from GeneradorGrafos import * from Dibujador import * # grafo: todos los nodos y ejes, p1 p2 estaRel(v,u) #dibujo: l1, l2 los nodos que no se pueden mover class HeuristicaRemocion (ResolvedorConstructivo): def contarCrucesAcumTree(p1,p2,ejes): if len(p1) < len(p2): ...
[ [ 1, 0, 0.0049, 0.0049, 0, 0.66, 0, 16, 0, 1, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0097, 0.0049, 0, 0.66, 0.25, 590, 0, 1, 0, 0, 590, 0, 0 ], [ 1, 0, 0.0146, 0.0049, 0, 0.66...
[ "from GrafoBipartito import *", "from GeneradorGrafos import *", "from Dibujador import *", "class HeuristicaRemocion (ResolvedorConstructivo):\n def contarCrucesAcumTree(p1,p2,ejes):\n if len(p1) < len(p2):\n return contarCrucesAcumTree(p2,p1,[(y,x) for (x,y) in ejes])\n lista=[]\...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras from SolucionFuerzaBruta import cuantasCombinaciones class ResolvedorSwapperTabla(Resolv...
[ [ 1, 0, 0.0129, 0.0032, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.029, 0.0032, 0, 0.66, 0.1667, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0323, 0.0032, 0, 0.6...
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras", "from SolucionFuerzaBruta import cuantasCombinaciones", "class ResolvedorSwapperTabla(ResolvedorConstructivo):\n\n ########################...
# Heuristica de agregar nodos de a uno y a acomodarlos from GrafoBipartito import ResolvedorConstructivo, Dibujo, GrafoBipartito from Dibujador import DibujadorGrafoBipartito from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio from sets import * class HeuristicaInsercionNodosMayorGrado(R...
[ [ 1, 0, 0.0183, 0.0092, 0, 0.66, 0, 16, 0, 3, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0275, 0.0092, 0, 0.66, 0.2, 851, 0, 1, 0, 0, 851, 0, 0 ], [ 1, 0, 0.0367, 0.0092, 0, 0.66,...
[ "from GrafoBipartito import ResolvedorConstructivo, Dibujo, GrafoBipartito", "from Dibujador import DibujadorGrafoBipartito", "from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio", "from sets import *", "class HeuristicaInsercionNodosMayorGrado(ResolvedorConstructivo):\n de...
#!/usr/bin/python # -*- coding: utf-8 -*- import sys #import psyco #psyco.full() from GrafoBipartito import Dibujo, ResolvedorConstructivo from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras from SolucionFuerzaBruta import cuantasCombinaciones, tamArbol class ResolvedorSwapperTa...
[ [ 1, 0, 0.0109, 0.0027, 0, 0.66, 0, 509, 0, 1, 0, 0, 509, 0, 0 ], [ 1, 0, 0.0245, 0.0027, 0, 0.66, 0.1667, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0272, 0.0027, 0, 0....
[ "import sys", "from GrafoBipartito import Dibujo, ResolvedorConstructivo", "from GrafoBipartito import crucesEntre, crucesPorAgregarAdelante, crucesPorAgregarAtras", "from SolucionFuerzaBruta import cuantasCombinaciones, tamArbol", "class ResolvedorSwapperTablaConPoda(ResolvedorConstructivo):\n\n #######...
# Heuristica de agregar nodos de a uno y a acomodarlos from GrafoBipartito import ResolvedorConstructivo, Dibujo from Dibujador import DibujadorGrafoBipartito from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio import random class HeuristicaInsercionNodosRandom(ResolvedorConstructivo): ...
[ [ 1, 0, 0.0211, 0.0105, 0, 0.66, 0, 16, 0, 2, 0, 0, 16, 0, 0 ], [ 1, 0, 0.0316, 0.0105, 0, 0.66, 0.2, 851, 0, 1, 0, 0, 851, 0, 0 ], [ 1, 0, 0.0421, 0.0105, 0, 0.66,...
[ "from GrafoBipartito import ResolvedorConstructivo, Dibujo", "from Dibujador import DibujadorGrafoBipartito", "from GeneradorGrafos import generarGrafoBipartitoAleatorio, generarDibujoAleatorio", "import random", "class HeuristicaInsercionNodosRandom(ResolvedorConstructivo):\n #TODO: agregar valor alfa p...