代码拉取完成,页面将自动刷新
同步操作将从 Cybersh1t/HeadShot 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import pandas as pd
import numpy as np
from Tool import GrabScreen
import cv2
import time
import numpy as np
from Tool import keys
import matplotlib.pyplot as plt
"""wait_time = 3
#size=[512,256]
size= [2560,1080]
#window_size = (0, 0, 1920, 1080)
window_size = (int(2560/2-size[0]*0.5), int(1080/2-size[1]*0.5), int(2560/2+size[0]*0.5), int(1080/2+size[1]*0.5))
lower = np.array([89, 146, 170])
upper = np.array([95, 230, 255])
lower_R = np.array([0, 43, 46])
upper_R = np.array([10, 255, 255])
#origin_state = [size[0] / 2, size[1] / 2]
origin_state = [2560/2, 1080/2]
keys = keys.Keys()
def move_test(keys,size):
for i in range(size):
keys.directMouse(-1 * i, 0)
screen = GrabScreen.grab_screen(window_size)
screen_temp = cv2.cvtColor(screen, cv2.COLOR_BGR2HSV)
mask = cv2.inRange(screen_temp, lower, upper)
x, y, w, h = cv2.boundingRect(mask)
value=x-1280+0.5*w
for i in range(size):
keys.directMouse(1 * i, 0)
return value
value = []
for i in list(range(wait_time))[::-1]:
print(i + 1)
time.sleep(1)
for i in range(1,70):
temp = move_test(keys,i)
value.append(temp)
print(value)"""
import math
data = [1.0, 2.0, 2.5, 3.5, 4.0, 5.5, 8.0, 9.0, 13.0, 14.0, 17.0, 22.5, 25.5, 28.0, 33.5, 37.0, 42.0, 47.0, 54.0, 59.0, 63.5, 71.0, 78.5, 83.0, 90.5, 97.5, 108.5, 114.0, 122.0, 131.0, 141.5, 150.0, 159.5, 169.5, 180.5, 191.5, 204.0, 214.5, 229.5, 239.0, 253.5, 267.0, 279.5, 296.0, 312.0, 327.0, 342.0, 358.0, 375.0, 393.5, 414.5, 432.0, 452.0, 473.5, 496.0, 518.5, 543.0, 570.5, 595.0, 623.5, 653.0, 685.0, 718.0, 753.5, 793.5, 832.0, 875.5, 921.5, 972.0]
true_data=[]
x_data=[]
y_data=[]
for i in range(len(data)):
true_data.append([data[i],(i+1)**2])
x_data.append((i+1)**2/5)
for i in range(1,1000):
y_data.append(i)
plt.plot(data,x_data)
plt.plot(y_data)
plt.show()
for i in range(len(data)):
print(str(true_data[i])[1:-1])
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。