-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest(writing stock market image).py
More file actions
103 lines (93 loc) · 2.74 KB
/
Copy pathtest(writing stock market image).py
File metadata and controls
103 lines (93 loc) · 2.74 KB
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import gspread
from oauth2client.service_account import ServiceAccountCredentials
import time
scope =["https://spreadsheets.google.com/feeds",'https://www.googleapis.com/auth/spreadsheets',"https://www.googleapis.com/auth/drive.file","https://www.googleapis.com/auth/drive"]
creds = ServiceAccountCredentials.from_json_keyfile_name('testSheetAPI_Key.json', scope)
client = gspread.authorize(creds)
# python_test = client.open('testSheet').sheet1
Page_IM = client.open('testSheet').worksheet('IM')
Page_Sheet2 = client.open('testSheet').worksheet('Sheet2')
# for i in range(128):
# if i <= 42:
# j = i
# k = 0
# elif i > 42 and i <= 85:
# j = i-43
# k = 6
# elif i > 85:
# j = i-(43*2)
# k = 12
# Page_Sheet2.update_cell(2+j,1+k,i+1)
# if (i!=0) and (i%59)==0:
# print('Sleeping for a minute')
# time.sleep(61)
#time.sleep(61)
# for i in range(128):
# if i <= 42:
# j = i
# k = 0
# elif i > 42 and i <= 85:
# j = i-43
# k = 6
# elif i > 85:
# j = i-(43*2)
# k = 12
# update_val = Page_IM.cell(2+i,2).value
# print(j,k,update_val)
# Page_Sheet2.update_cell(2+j,2+k,update_val)
# if (i!=0) and (i%59)==0:
# print('Sleeping for a minute')
# time.sleep(61)
#time.sleep(61)
Page_Sheet2.update_cell(2+j,4+k,update_val)
quit()
for i in range(128):
if i <= 42:
j = i
k = 0
elif i > 42 and i <= 85:
j = i-43
k = 6
elif i > 85:
j = i-(43*2)
k = 12
update_val = Page_IM.cell(2+i,3).value
print(j,k,update_val)
Page_Sheet2.update_cell(2+j,3+k,update_val)
if (i!=0) and (i%59)==0:
print('Sleeping for a minute')
time.sleep(61)
time.sleep(61)
for i in range(128):
if i <= 42:
j = i
k = 0
elif i > 42 and i <= 85:
j = i-43
k = 6
elif i > 85:
j = i-(43*2)
k = 12
update_val = Page_IM.cell(2+i,4).value
print(j,k,update_val)
Page_Sheet2.update_cell(2+j,4+k,update_val)
if (i!=0) and (i%59)==0:
print('Sleeping for a minute')
time.sleep(61)
time.sleep(61)
for i in range(128):
if i <= 42:
j = i
k = 0
elif i > 42 and i <= 85:
j = i-43
k = 6
elif i > 85:
j = i-(43*2)
k = 12
update_val = Page_IM.cell(2+i,5).value
print(j,k,update_val)
Page_Sheet2.update_cell(2+j,5+k,update_val)
if (i!=0) and (i%59)==0:
print('Sleeping for a minute')
time.sleep(61)