-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemp.py
More file actions
59 lines (44 loc) · 1.38 KB
/
Copy pathtemp.py
File metadata and controls
59 lines (44 loc) · 1.38 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
# # import pandas as pd
import numpy as np
# # # import concurrent.futures
# # # import copy
# # # executor = concurrent.futures.ThreadPoolExecutor(5)
# # # def multi(x): # outer function that runs another function multiple times
# # # temp = copy.deepcopy(x) # don't want to work on original input
# # # def single(): # function to run multiple times
# # # nonlocal temp
# # # temp.append(2)
# # # if __name__ == '__main__':
# # # futures = [executor.submit(single(), item) for item in range(2)]
# # # concurrent.futures.wait(futures)
# # # temp.append(1)
# # # return temp
# # # a = [21]
# # # multi(a)
# # # print(a, multi(a)) # this returns [21, 2, 2, 1] and not [21]
# # a = [1, 2, 2]
# # a.remove(2)
# # print(a)
# class hand: # actions are deterministic
# def __init__(self, card1, card2):
# # self.card1 = card1
# # self.card2 = card2
# self.cards = [np.min([card1, card2]), np.max([card1, card2])]
# a = hand(1, 2)
# print(a.cards)
# # a.card2 = 0
# # a.__init__(a.cards[0], 0)
# # print(a.cards)
# def func(temp):
# temp.__init__(temp.cards[1], 5)
# func(a)
# print(a.cards)
# print([np.min([6, 2]), np.max([6, 2])][1])
# a = [1, 2]
# b = a.remove(2)
# print(a)
temp = [3np.nonzero(p2.cards)[0][0], 5, 4, 1, 0]
# temp.remove(1)
# owncard = temp
# print(owncard)
print(temp[np.nonzero(temp)[0][0]])