-
Notifications
You must be signed in to change notification settings - Fork 1
/
populate_exercises.py
61 lines (53 loc) · 1.9 KB
/
populate_exercises.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# -*- coding: utf-8 -*-
# TODO: Añadir datos con sentido
from pymongo import MongoClient
connection = MongoClient("mongodb://localhost:27017")
db = connection.iv.movements
db.insert({ "name":"Dominadas",
"material": "Barra",
"muscles":[{"name":"bicep","percentage":20},
{"name":"pectoral","percentage":10},
{"name":"dorsal","percentage":60},
{"name":"abdominales","percentage":10}
]
})
db.insert({ "name":"Press Banca",
"material": "Barra",
"muscles":[{"name":"tricep","percentage":20},
{"name":"pectoral","percentage":60},
{"name":"hombro","percentage":10},
{"name":"abdominales","percentage":10}
]
})
db.insert({ "name":"Sentadillas",
"material": "Barra",
"muscles":[{"name":"cuadricep","percentage":50},
{"name":"glueteo","percentage":20},
{"name":"femoral","percentage":20},
{"name":"abdominales","percentage":10}
]
})
db.insert({ "name":"Curl Femoral",
"material": "Barra",
"muscles":[{"name":"femoral","percentage":80},
{"name":"glutep","percentage":20}
]
})
db.insert({ "name":"Remo Polea Baja",
"material": "Barra",
"muscles":[{"name":"bicep","percentage":20},
{"name":"pectoral","percentage":10},
{"name":"dorsal","percentage":50},
{"name":"lumbar","percentage":20}
]
})
db.insert({ "name":"Elevaciones de Gemelos",
"material": "Barra",
"muscles":[{"name":"gemelos","percentage":60},
{"name":"soleo","percentage":40}
]
})
print('+-+-+-+-+-+-+-+-+-+-+-+-+-+-')
print('Inserted ' + str(db.count()) + ' movements')
print('+-+-+-+-+-+-+-+-+-+-+-+-+-+-')
connection.close()