Exemple #1
0
		print "|   ",row
	print("| --- user ---")
	user_select = cursor.execute("SELECT * from user")
       	for row in user_select :
		print "|   ",row
	print("| ---rating---")
	rating_select = cursor.execute("SELECT * from rating")
       	for row in rating_select :
		print "|   ",row
	print("--------END DB--------")


"""
simple test code
"""
'''
#useful picture number in /hair
L = [0, 1,4,5,6,14,17,19,22,23,24,28,35,36,40,43,46,48,50,51,56,57,58,60,61,62,63,64,68,69,70,74,75,77,78,80,83,84,85]
#rating 
R = [0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5]

def select_random(lis, num) :
	l = []
	for i in range(num) : l.append(random.choice(lis))
	return l

make_DB()
"""
for i in L :
	d  = check_hair_front("hair/t%d.jpg"%(i))
	print d, categorize(d)
Exemple #2
0
       	for row in item_select :
		print "|   ",row
         
	print("| --- user ---")
	user_select = cursor.execute("SELECT * from user")
       	for row in user_select :
		print "|   ",row
        
	print("| ---rating---")
	rating_select = cursor.execute("SELECT * from rating")
       	for row in rating_select :
		print "|   ",row
        
	print("--------END DB--------")

"""
simple test code


#useful picture number in /hair
L = [0, 1,4,5,6,14,17,19,22,23,24,28,35,36,40,43,46,48,50,51,56,57,58,60,61,62,63,64,68,69,70,74,75,77,78,80,83,84,85]
#rating 
R = [0,0.5,1,1.5,2,2.5,3,3.5,4,4.5,5]

def select_random(lis, num) :
	l = []
	for i in range(num) : l.append(random.choice(lis))
	return l

make_DB()