· 5 years ago · Feb 27, 2020, 12:18 AM
1import os
2import re
3import sqlite3
4import sys
5import random
6
7
8class DbProvider:
9
10 def random_features(self, skintype):
11 features = ['face', 'l_ear', 'r_ear', 'l_eye', 'r_eye', 'l_eyebrow', 'r_eyebrow', 'nose', 'mouth', 'hair',
12 'suit']
13 for key in features:
14 if key == 'l_eye' or key == 'r_eye':
15 eyes = self.custom_select("SELECT Path FROM Eye e WHERE e.SkinType=LOWER('{}')".format(skintype))
16 print(eyes.__len__())
17 x = list(eyes.keys())
18 number = random.choice(x)
19 print(number)
20
21 def addEyes(self, size, color, skintype, legacy):
22 self.eye.insert_into_table(size, color, skintype, "left", "Files/Features/" + legacy + "/l_eye.png", legacy)
23 self.eye.insert_into_table(size, color, skintype, "right", "Files/Features/" + legacy + "/r_eye.png", legacy)
24 leftEye = \
25 self.custom_select("SELECT ID FROM Eye e WHERE e.Side=LOWER('left') AND e.Legacy='{}'".format(legacy))[
26 '0'].get(
27 'ID')
28 rightEye = \
29 self.custom_select("SELECT ID FROM Eye e WHERE e.Side=LOWER('right') AND e.Legacy='{}'".format(legacy))[
30 '0'].get('ID')
31 self.eyes.insert_into_table(skintype, leftEye, rightEye)
32 x = self.custom_select("SELECT ID FROM Eyes ORDER BY ID DESC LIMIT 1;")['0'].get('ID')
33 print(x, "dupa")
34
35 def addEars(self, size, skintype, legacy):
36 self.ear.insert_into_table(size, skintype, "left", "Files/Features/" + legacy + "/l_ear.png", legacy)
37 self.ear.insert_into_table(size, skintype, "right", "Files/Features/" + legacy + "/r_ear.png", legacy)
38 leftEar = \
39 self.custom_select(
40 "SELECT ID FROM Ear e WHERE e.Side=LOWER('left') AND e.Legacy=LOWER('{}')".format(legacy))[
41 '0'].get('ID')
42 rightEar = \
43 self.custom_select(
44 "SELECT ID FROM Ear e WHERE e.Side=LOWER('right') AND e.Legacy=LOWER('{}')".format(legacy))[
45 '0'].get('ID')
46 self.ears.insert_into_table(skintype, leftEar, rightEar)
47
48 def addEyeBrows(self, size, color, skintype, legacy):
49 self.eyeBrow.insert_into_table(size, color, skintype, "left", "Files/Features/" + legacy + "/l_eyebrow.png",
50 legacy)
51 self.eyeBrow.insert_into_table(size, color, skintype, "right", "Files/Features/" + legacy + "/r_eyebrow.png",
52 legacy)
53 leftEyeBrow = self.custom_select(
54 "SELECT ID FROM EyeBrow e WHERE e.Side=LOWER('left') AND e.Legacy=LOWER('{}')".format(legacy))['0'].get(
55 'ID')
56 rightEyeBrow = self.custom_select(
57 "SELECT ID FROM EyeBrow e WHERE e.Side=LOWER('right') AND e.Legacy=LOWER('{}')".format(legacy))['0'].get(
58 'ID')
59 self.ears.insert_into_table(skintype, leftEyeBrow, rightEyeBrow)
60
61 def addNose(self, size, skintype, legacy):
62 self.nose.insert_into_table(size, skintype, "Files/Features/" + legacy + "/nose.png")
63
64 def addMouth(self, size, skintype, legacy):
65 self.mouth.insert_into_table(size, skintype, "Files/Features/" + legacy + "/mouth.png")
66
67 def addHair(self, hairtype, colour, skintype, legacy):
68 self.hair.insert_into_table(hairtype, colour, skintype, "Files/Features/" + legacy + "/hair.png")
69
70 def addFace(self, skintype, size, legacy):
71 self.face.insert_into_table(skintype, size, "Files/Features/" + legacy + "/face.png")
72
73 def addAttributeAssignment(self, faceID, eyesID, eyebrowsID, noseID, mouthID, earsID, hairID):
74 self.AttributeAssignment.insert_into_table(faceID, eyesID, eyebrowsID, noseID, mouthID, earsID, hairID)
75 attribiteAssignmentID = self.custom_select("SELECT ID FROM AttributeAssignment ORDER BY ID DESC LIMIT 1;")[
76 '0'].get('ID')
77 return attribiteAssignmentID
78
79 def addAppearance(self, attributeAssignmentID, skintype, filePath):
80 self.appearance.insert_into_table(attributeAssignmentID, skintype, filePath)
81
82 def database_path(self, relative):
83 p = os.path.join(os.environ.get("_MEIPASS2", os.path.abspath(".")), relative)
84 print("XD", p)
85 return p
86
87 def get_data_from_table(self, table_name):
88 # Get headers of table
89 header_request = '''SELECT name FROM PRAGMA_TABLE_INFO('{}')'''.format(table_name)
90 self.cursor.execute(header_request)
91 headers = self.cursor.fetchall()
92
93 # Get rows of table
94 sql = '''SELECT * FROM {}'''.format(table_name)
95 self.cursor.execute(sql)
96 rows = self.cursor.fetchall()
97
98 # Create dict
99 dataset = {}
100 data = {}
101 j = 0
102 for row in rows:
103 i = 0
104 for item in row:
105 data[str(headers[i][0])] = str(item)
106 i += 1
107 dataset[str(j)] = data.copy()
108 j += 1
109 data.clear()
110 self.dataSet.clear()
111 self.dataSet = dataset
112 return dataset
113
114 def __init__(self):
115 self.path = self.database_path('DB\db.sqlite')
116 print(self.path)
117 self.dataSet = {}
118
119 if not os.path.isfile(self.path):
120 try:
121 os.mkdir(self.database_path("DB"))
122 except:
123 pass
124 # Create database if not exist and get a connection to it
125 self.connection = sqlite3.connect(self.path)
126 # Get a cursor to execute sql statements
127 self.cursor = self.connection.cursor()
128
129 # Create tables
130 self.custom_face = self.CustomFace(self)
131 self.face = self.Face(self)
132 self.eye = self.Eye(self)
133 self.eyes = self.Eyes(self)
134 self.ear = self.Ear(self)
135 self.ears = self.Ears(self)
136 self.eyeBrow = self.EyeBrow(self)
137 self.eyeBrows = self.EyeBrows(self)
138 self.nose = self.Nose(self)
139 self.lips = self.Mouth(self)
140 self.hair = self.Hair(self)
141 self.AttributeAssignment = self.AttributeAssignment(self)
142 self.appearance = self.Appearance(self)
143
144 def get_dict(self, headers, rows): # Create dict
145 dataset = {}
146 data = {}
147 j = 0
148 for row in rows:
149 i = 0
150 for item in row:
151 data[str(headers[i])] = str(item)
152 i += 1
153 dataset[str(j)] = data.copy()
154 j += 1
155 data.clear()
156 self.dataSet.clear()
157 self.dataSet = dataset
158 return dataset
159
160 def custom_select(self, select_formula):
161 headers = []
162 x = re.split("(?i)FROM", select_formula)
163 headers = re.findall(r'(\w+)+', re.split("(?i)SELECT", x[0])[1], re.IGNORECASE)
164 if headers == []:
165 headers = re.findall(r'([*]+)', re.split("(?i)SELECT", x[0])[1], re.IGNORECASE)
166
167 table_name = re.findall(r'(\w+)+', x[1], re.IGNORECASE)[0]
168 # Get headers of table
169 if (headers[0] == '*'):
170 header_request = '''SELECT name FROM PRAGMA_TABLE_INFO('{}')'''.format(table_name)
171 self.cursor.execute(header_request)
172 headers = self.cursor.fetchall()
173 new_headers = []
174 for h in headers:
175 new_headers.append(h[0])
176 headers = new_headers
177 # Get rows of table
178 sql = select_formula
179 try:
180 self.cursor.execute(sql)
181 except:
182 pass
183 rows = self.cursor.fetchall()
184 return self.get_dict(headers, rows)
185
186 class Face:
187 def insert_into_table(self, skintype, size, path):
188 sql = '''INSERT INTO Face (SkinType, Size, Path) VALUES ('{}','{}','{}');'''.format(skintype, size, path)
189 self.cursor.execute(sql)
190 self.connection.commit()
191
192 def __init__(self, parent):
193 self.connection = parent.connection
194 self.cursor = parent.cursor
195 sql = '''CREATE TABLE IF NOT EXISTS Face
196 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
197 SkinType VARCHAR(100),
198 Size VARCHAR(20),
199 Path VARCHAR(300)
200 )'''
201 self.cursor.execute(sql)
202 self.connection.commit()
203
204 class Eyes:
205 def insert_into_table(self, skintype, L_ID, R_ID):
206 sql = '''INSERT INTO Eyes (SkinType, L_ID, R_ID) VALUES ('{}',{},{});'''.format(skintype, L_ID, R_ID)
207 self.cursor.execute(sql)
208 self.connection.commit()
209
210 def __init__(self, parent):
211 self.connection = parent.connection
212 self.cursor = parent.cursor
213 sql = '''CREATE TABLE IF NOT EXISTS Eyes
214 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
215 SkinType VARCHAR(100),
216 L_ID INT,
217 R_ID INT,
218 FOREIGN KEY(L_ID) references Eye(ID),
219 FOREIGN KEY(R_ID) references Eye(ID)
220 )'''
221 self.cursor.execute(sql)
222 self.connection.commit()
223
224 class Eye:
225 def insert_into_table(self, size, colour, skintype, side, path, legacy):
226 sql = '''INSERT INTO Eye (Size, Colour, SkinType, Side, Path, Legacy) VALUES ('{}', '{}' ,'{}','{}','{}','{}');'''.format(
227 size, colour, skintype, side, path, legacy)
228 self.cursor.execute(sql)
229 self.connection.commit()
230
231 def __init__(self, parent):
232 self.connection = parent.connection
233 self.cursor = parent.cursor
234 sql = '''CREATE TABLE IF NOT EXISTS Eye
235 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
236 Size VARCHAR(100),
237 Colour VARCHAR(100),
238 SkinType VARCHAR(100),
239 Side VARCHAR(100),
240 Path VARCHAR(300),
241 Legacy VARCHAR(100)
242 )'''
243 self.cursor.execute(sql)
244 self.connection.commit()
245
246 class Nose:
247 def insert_into_table(self, size, skintype, path):
248 sql = '''INSERT INTO Nose (Size,SkinType,Path) VALUES ('{}',{},'{}');'''.format(size, skintype, path)
249 self.cursor.execute(sql)
250 self.connection.commit()
251
252 def __init__(self, parent):
253 self.connection = parent.connection
254 self.cursor = parent.cursor
255 sql = '''CREATE TABLE IF NOT EXISTS Nose
256 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
257 Size VARCHAR(100),
258 SkinType VARCHAR(100),
259 Path VARCHAR(300)
260 )'''
261 self.cursor.execute(sql)
262 self.connection.commit()
263
264 class Mouth:
265 def insert_into_table(self, size, skintype, path):
266 sql = '''INSERT INTO Lips (SkinType, Size, Colour, Path) VALUES ('{}',{},'{}');'''.format(size,
267 skintype,
268 path)
269 self.cursor.execute(sql)
270 self.connection.commit()
271
272 def __init__(self, parent):
273 self.connection = parent.connection
274 self.cursor = parent.cursor
275 sql = '''CREATE TABLE IF NOT EXISTS Mouth
276 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
277 SkinType VARCHAR(100),
278 Size VARCHAR(100),
279 Path VARCHAR(300)
280 )'''
281 self.cursor.execute(sql)
282 self.connection.commit()
283
284 class Ears:
285 def insert_into_table(self, skintype, L_ID, R_ID):
286 sql = '''INSERT INTO Ears (Shape, L_ID, R_ID) VALUES ('{}',{},{});'''.format(skintype, L_ID, R_ID)
287 self.cursor.execute(sql)
288 self.connection.commit()
289
290 def __init__(self, parent):
291 self.connection = parent.connection
292 self.cursor = parent.cursor
293 sql = '''CREATE TABLE IF NOT EXISTS Ears
294 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
295 SkinType VARCHAR(100),
296 L_ID INT,
297 R_ID INT,
298 FOREIGN KEY(L_ID) references Eye(ID),
299 FOREIGN KEY(R_ID) references Eye(ID)
300 )'''
301 self.cursor.execute(sql)
302 self.connection.commit()
303
304 class Ear:
305 def insert_into_table(self, size, skintype, side, path, legacy):
306 sql = '''INSERT INTO Ear (Size, SkinType, Side, Path) VALUES ('{}',{},'{}','{}','{}');'''.format(size,
307 skintype,
308 side,
309 path,
310 legacy)
311 self.cursor.execute(sql)
312 self.connection.commit()
313
314 def __init__(self, parent):
315 self.connection = parent.connection
316 self.cursor = parent.cursor
317 sql = '''CREATE TABLE IF NOT EXISTS Ear
318 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
319 SkinType VARCHAR(100),
320 Side VARCHAR(100),
321 Path VARCHAR(300),
322 Legacy VARCHAR(100)
323 )'''
324 self.cursor.execute(sql)
325 self.connection.commit()
326
327 class EyeBrows:
328 def insert_into_table(self, skintype, L_ID, R_ID):
329 sql = '''INSERT INTO Ears (Shape, L_ID, R_ID) VALUES ('{}',{},{});'''.format(skintype, L_ID, R_ID)
330 self.cursor.execute(sql)
331 self.connection.commit()
332
333 def __init__(self, parent):
334 self.connection = parent.connection
335 self.cursor = parent.cursor
336 sql = '''CREATE TABLE IF NOT EXISTS EyeBrows
337 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
338 SkinType VARCHAR(100),
339 L_ID INT,
340 R_ID INT,
341 FOREIGN KEY(L_ID) references EyeBrow(ID),
342 FOREIGN KEY(R_ID) references EyeBrow(ID)
343 )'''
344 self.cursor.execute(sql)
345 self.connection.commit()
346
347 class EyeBrow:
348 def insert_into_table(self, size, colour, skintype, side, path, legacy):
349 sql = '''INSERT INTO Ear (Size, Colour, SkinType, Side, Path, Legacy) VALUES ('{}','{}','{}','{}','{}','{}');'''.format(
350 size, colour, skintype,
351 side,
352 path, legacy)
353 self.cursor.execute(sql)
354 self.connection.commit()
355
356 def __init__(self, parent):
357 self.connection = parent.connection
358 self.cursor = parent.cursor
359 sql = '''CREATE TABLE IF NOT EXISTS EyeBrow
360 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
361 Size VARCHAR(100),
362 Colour VARCHAR(100),
363 SkinType VARCHAR(100),
364 Side VARCHAR(100),
365 Path VARCHAR(300),
366 Legacy VARCHAR(100)
367 )'''
368 self.cursor.execute(sql)
369 self.connection.commit()
370
371 class Hair:
372 def insert_into_table(self, hairtype, colour, skintype, path):
373 sql = '''INSERT INTO Hair (HairType, Colour, SkinType, Path) VALUES ('{}','{}','{}','{}');'''.format(
374 hairtype, colour, skintype, path)
375 self.cursor.execute(sql)
376 self.connection.commit()
377
378 def __init__(self, parent):
379 self.connection = parent.connection
380 self.cursor = parent.cursor
381 sql = '''CREATE TABLE IF NOT EXISTS Hair
382 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
383 HairType VARCHAR(100),
384 Colour VARCHAR(100),
385 SkinType VARCHAR(100),
386 Path VARCHAR(300)
387 )'''
388 self.cursor.execute(sql)
389 self.connection.commit()
390
391 class AttributeAssignment: # AttributeAssignment
392 def insert_into_table(self, faceID, eyesID, eyebrowsID, noseID, mouthID, earsID, hairID):
393 sql = '''INSERT INTO AttributeAssignment (FaceID, EyesID, NoseID, MouthID, EarsID, HairID)
394 VALUES ({},{},{},{},{},{});'''.format(faceID, eyesID, noseID, mouthID, earsID, hairID)
395 self.cursor.execute(sql)
396 self.connection.commit()
397
398 def __init__(self, parent):
399 self.connection = parent.connection
400 self.cursor = parent.cursor
401 sql = '''CREATE TABLE IF NOT EXISTS AttributeAssignment
402 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
403 FaceID INTEGER,
404 EyesID INTEGER,
405 NoseID INTEGER,
406 MouthID INTEGER,
407 EarsID INTEGER,
408 HairID INTEGER,
409 FOREIGN KEY(FaceID) references Face(ID),
410 FOREIGN KEY(EyesID) references Eyes(ID),
411 FOREIGN KEY(NoseID) references Nose(ID),
412 FOREIGN KEY(MouthID) references Mouth(ID),
413 FOREIGN KEY(EarsID) references Ears(ID),
414 FOREIGN KEY(HairID) references Hair(ID)
415 )'''
416 self.cursor.execute(sql)
417 self.connection.commit()
418
419 class Appearance: # Appearance
420 def insert_into_table(self, assignmentID, skintype, filePath):
421 sql = '''INSERT INTO Appearance (AssignmentID, SkinType, Date, Path) VALUES ({},'{}',DATETIME('now','localtime'),'{}');'''.format(
422 assignmentID, skintype, filePath)
423 self.cursor.execute(sql)
424 self.connection.commit()
425
426 def __init__(self, parent):
427 self.connection = parent.connection
428 self.cursor = parent.cursor
429 sql = '''CREATE TABLE IF NOT EXISTS Appearance
430 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
431 AssignmentID INTEGER,
432 SkinType VARCHAR(100),
433 Date VARCHAR(100),
434 Path varchar(300),
435 FOREIGN KEY(AssignmentID) references AttributeAssignment(ID)
436 )'''
437 self.cursor.execute(sql)
438 self.connection.commit()
439
440 class CustomFace:
441 def insert_into_table(self, name, genetic, path):
442 sql = '''INSERT INTO CustomFace (Name, Genetic, Path) VALUES ('{}', '{}','{}');'''.format(name, genetic,
443 path)
444 self.cursor.execute(sql)
445 self.connection.commit()
446
447 def __init__(self, parent):
448 self.connection = parent.connection
449 self.cursor = parent.cursor
450 sql = '''CREATE TABLE IF NOT EXISTS CustomFace
451 (ID INTEGER PRIMARY KEY AUTOINCREMENT,
452 Name varchar(100),
453 Genetic varchar(100),
454 Path varchar(100)
455 )'''
456 self.cursor.execute(sql)
457 self.connection.commit()
458
459
460if __name__ == "__main__":
461 db = DbProvider()
462 # first face
463 db.addEyes("small", "blue", "white", "InputFace-01")
464 db.addEars("small", "white", "InputFace-01")
465 db.addEyeBrows("small", "bright", "white", "InputFace-01")
466 db.addNose("small", "white", "InputFace-01")
467 db.addMouth("small", "white", "InputFace-01")
468 db.addHair("long", "bright", "white", "InputFace-01")
469 db.addFace("white", "small", "InputFace-01")
470 # second face
471 db.addEyes("small", "brown", "white", "InputFace-02")
472 db.addEars("small", "white", "InputFace-02")
473 db.addEyeBrows("small", "dark", "white", "InputFace-02")
474 db.addNose("small", "white", "InputFace-02")
475 db.addMouth("small", "white", "InputFace-02")
476 db.addHair("long", "dark", "white", "InputFace-02")
477 db.addFace("white", "small", "InputFace-02")
478 # third face
479 db.addEyes("small", "blue", "white", "InputFace-03")
480 db.addEars("small", "white", "InputFace-03")
481 db.addEyeBrows("small", "bright", "white", "InputFace-03")
482 db.addNose("small", "white", "InputFace-03")
483 db.addMouth("small", "white", "InputFace-03")
484 db.addHair("long", "bright", "white", "InputFace-03")
485 db.addFace("white", "small", "InputFace-03")
486 # 4th face
487 db.addEyes("small", "blue", "white", "InputFace-04")
488 db.addEars("small", "white", "InputFace-04")
489 db.addEyeBrows("small", "bright", "white", "InputFace-04")
490 db.addNose("small", "white", "InputFace-04")
491 db.addMouth("small", "white", "InputFace-04")
492 db.addHair("long", "bright", "white", "InputFace-04")
493 db.addFace("white", "small", "InputFace-04")
494 # 5th face
495 db.addEyes("small", "blue", "white", "InputFace-05")
496 db.addEars("small", "white", "InputFace-05")
497 db.addEyeBrows("small", "bright", "white", "InputFace-05")
498 db.addNose("small", "white", "InputFace-05")
499 db.addMouth("small", "white", "InputFace-05")
500 db.addHair("long", "bright", "white", "InputFace-05")
501 db.addFace("white", "small", "InputFace-05")
502 # 6th face
503 db.addEyes("medium", "brown", "white", "InputFace-06")
504 db.addEars("medium", "white", "InputFace-06")
505 db.addEyeBrows("medium", "dark", "white", "InputFace-06")
506 db.addNose("medium", "white", "InputFace-06")
507 db.addMouth("medium", "white", "InputFace-06")
508 db.addHair("short", "dark", "white", "InputFace-06")
509 db.addFace("white", "medium", "InputFace-06")
510 # 7th face
511 db.addEyes("medium", "brown", "white", "InputFace-07")
512 db.addEars("medium", "white", "InputFace-07")
513 db.addEyeBrows("medium", "dark", "white", "InputFace-07")
514 db.addNose("medium", "white", "InputFace-07")
515 db.addMouth("medium", "white", "InputFace-07")
516 db.addHair("short", "dark", "white", "InputFace-07")
517 db.addFace("white", "medium", "InputFace-07")
518 # 8th face
519 db.addEyes("medium", "blue", "white", "InputFace-08")
520 db.addEars("medium", "white", "InputFace-08")
521 db.addEyeBrows("medium", "bright", "white", "InputFace-08")
522 db.addNose("medium", "white", "InputFace-08")
523 db.addMouth("medium", "white", "InputFace-08")
524 db.addHair("short", "bright", "white", "InputFace-08")
525 db.addFace("white", "medium", "InputFace-08")
526 # 9th face
527 db.addEyes("medium", "blue", "white", "InputFace-09")
528 db.addEars("medium", "white", "InputFace-09")
529 db.addEyeBrows("medium", "bright", "white", "InputFace-09")
530 db.addNose("medium", "white", "InputFace-09")
531 db.addMouth("medium", "white", "InputFace-09")
532 db.addHair("short", "bright", "white", "InputFace-09")
533 db.addFace("white", "medium", "InputFace-09")
534 # 10th face
535 db.addEyes("medium", "blue", "white", "InputFace-10")
536 db.addEars("medium", "white", "InputFace-10")
537 db.addEyeBrows("medium", "dark", "white", "InputFace-10")
538 db.addNose("medium", "white", "InputFace-10")
539 db.addMouth("medium", "white", "InputFace-10")
540 db.addHair("short", "dark", "white", "InputFace-10")
541 db.addFace("white", "medium", "InputFace-10")
542
543 # # db.eye.insert_into_table("Big", "blue", "white", "left", "dupa")
544 # # db.get_data_from_table("CustomFace")
545 # # db.insert_into_table('Face', 'tempName')
546 # # db.get_data_from_table('Face')
547 # # db.eye.insert_into_table("small", "asd", "asd", "left", "dupa", "qwe")
548 # # db.eye.insert_into_table("small", "blue", "white", "left", "Files/Features/InputFace-00/l_eye.png", "InputFace-00")
549 # # db.eye.insert_into_table("small", "blue", "white", "right", "Files/Features/InputFace-00/r_eye.png", "InputFace-00")
550 # # lefyEye = db.custom_select("SELECT ID FROM Eye e WHERE e.Side=LOWER('left') AND e.Legacy=LOWER('InputFace-00')")[
551 # # '0'].get('ID')
552 # # rightEye = db.custom_select("SELECT ID FROM Eye e WHERE e.Side=LOWER('right') AND e.Legacy=LOWER('InputFace-00')")[
553 # # '0'].get('ID')
554 # # db.eyes.insert_into_table("white", lefyEye, rightEye)
555 #
556 # db.addEyes("small", "blue", "white", "InputFace-00")
557 # db.random_features("white")
558 # # db.addEars()