解决分支冲突
This commit is contained in:
commit
745875c5f3
3
auto.py
3
auto.py
|
|
@ -22,7 +22,6 @@ click(_close)
|
||||||
|
|
||||||
#店内账本
|
#店内账本
|
||||||
click(Text("店内账本"))
|
click(Text("店内账本"))
|
||||||
# vue2_el > div:nth-child(2) > section > div > div > div.pad30px.mb15.border_b.bgfff.balance_top > div:nth-child(2) > span.gray3.moneynum
|
|
||||||
# moneynum = S('//*[@id="vue2_el"]/div[1]/section/div/div/div[3]/div[2]/span[1]')
|
# moneynum = S('//*[@id="vue2_el"]/div[1]/section/div/div/div[3]/div[2]/span[1]')
|
||||||
moneynum = S('//span[contains(@class, "gray3") and contains(@class, "moneynum")]')
|
moneynum = S('//span[contains(@class, "gray3") and contains(@class, "moneynum")]')
|
||||||
wait_until(moneynum.exists)
|
wait_until(moneynum.exists)
|
||||||
|
|
@ -126,4 +125,4 @@ plus = Text("+")
|
||||||
confirm = Text("确认")
|
confirm = Text("确认")
|
||||||
# click(confirm)
|
# click(confirm)
|
||||||
# time.sleep(5)
|
# time.sleep(5)
|
||||||
# kill_browser()
|
kill_browser()
|
||||||
13
auto_v2.py
13
auto_v2.py
|
|
@ -10,7 +10,7 @@ chrome_options.add_experimental_option("mobileEmulation", mobile_emulation)
|
||||||
#chrome_options.add_experimental_option('excludeSwitches', ['enable-automation'])
|
#chrome_options.add_experimental_option('excludeSwitches', ['enable-automation'])
|
||||||
#chrome_options.add_experimental_option('useAutomationExtension', False)
|
#chrome_options.add_experimental_option('useAutomationExtension', False)
|
||||||
chrome_options.add_argument('--no-sandbox')
|
chrome_options.add_argument('--no-sandbox')
|
||||||
# chrome_options.add_argument('--headless')
|
chrome_options.add_argument('--headless')
|
||||||
chrome_options.add_argument('user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"')
|
chrome_options.add_argument('user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1"')
|
||||||
driver = start_chrome("https://youdian.jindianle.com/", options=chrome_options)
|
driver = start_chrome("https://youdian.jindianle.com/", options=chrome_options)
|
||||||
try:
|
try:
|
||||||
|
|
@ -49,16 +49,16 @@ try:
|
||||||
click(pls)
|
click(pls)
|
||||||
wait_until(Text('组选').exists)
|
wait_until(Text('组选').exists)
|
||||||
click(Text('组选'))
|
click(Text('组选'))
|
||||||
# 普通投注-> 取消组3
|
|
||||||
result = ['258', '357', '069', '168', '078', '267', '159', '339', '177', '366']
|
result = ['258', '357', '069', '168', '078', '267', '159', '339', '177', '366']
|
||||||
for index, item in enumerate(result):
|
for index, item in enumerate(result):
|
||||||
if len(set(item)) == 3:
|
if len(set(item)) == 3:
|
||||||
|
# 普通投注-> 取消组3
|
||||||
click(Text('普通投注'))
|
click(Text('普通投注'))
|
||||||
for i in item:
|
for i in item:
|
||||||
ball_line = S(f'//*[@id="body"]/section/div[3]/div[2]/ul/li[{int(i) + 1}]/p[1]')
|
ball_line = S(f'//*[@id="body"]/section/div[3]/div[2]/ul/li[{int(i) + 1}]/p[1]')
|
||||||
if ball_line.exists:
|
if ball_line.exists:
|
||||||
print(ball_line.web_element.text)
|
|
||||||
click(ball_line)
|
click(ball_line)
|
||||||
|
print(ball_line.web_element.text)
|
||||||
else:
|
else:
|
||||||
print(f"{i}不存在")
|
print(f"{i}不存在")
|
||||||
wait_until(Text("组3").exists)
|
wait_until(Text("组3").exists)
|
||||||
|
|
@ -73,15 +73,18 @@ try:
|
||||||
single_ball = S(f'//*[@id="body"]/section/div[3]/div[2]/div[2]/ul/li[{int(item[0]) + 1}]/p')
|
single_ball = S(f'//*[@id="body"]/section/div[3]/div[2]/div[2]/ul/li[{int(item[0]) + 1}]/p')
|
||||||
click(double_ball)
|
click(double_ball)
|
||||||
click(single_ball)
|
click(single_ball)
|
||||||
|
print(f"对子号:{double_ball.web_element.text}")
|
||||||
|
print(f"非对子号:{single_ball.web_element.text}")
|
||||||
print(f"{index}: {item}")
|
print(f"{index}: {item}")
|
||||||
wait_until(Text("下一步").exists)
|
wait_until(Text("下一步").exists)
|
||||||
click(Text("下一步"))
|
click(Text("下一步"))
|
||||||
if index + 1 != len(result):
|
if index + 1 != len(result):
|
||||||
wait_until(Text("+继续添加").exists)
|
wait_until(Text("+继续添加").exists)
|
||||||
click(Text("+继续添加"))
|
click(Text("+继续添加"))
|
||||||
wait_until(Text("保存").exists)
|
save = Text("保存")
|
||||||
|
wait_until(save.exists)
|
||||||
click(Text("保存"))
|
click(Text("保存"))
|
||||||
|
print(save.web_element.text)
|
||||||
# # 设置倍数后,再点击一次下一步
|
# # 设置倍数后,再点击一次下一步
|
||||||
# plus = Text("+")
|
# plus = Text("+")
|
||||||
# # click(plus)
|
# # click(plus)
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import requests
|
||||||
|
from furl import furl
|
||||||
|
import time
|
||||||
|
import json
|
||||||
|
|
||||||
|
file = open("data.json", "w+")
|
||||||
|
|
||||||
|
base_url = "https://www.ttyingqiu.com/"
|
||||||
|
f = furl(base_url)
|
||||||
|
|
||||||
|
f.path = "/static/no_cache/league/zc/jsbf/ttyq2020/jsbf_2022-11-06.json"
|
||||||
|
f.args["v"] = int(time.time()*1000)
|
||||||
|
print(f.url)
|
||||||
|
print(r.status_code)
|
||||||
|
print(r.json())
|
||||||
|
file.write(json.dumps(r.json()))
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
|
||||||
|
url = "/static/no_cache/league/zc/jsbf/ttyq2020/jczq/jsbf_2022-11-06.json?v=1667799791084"
|
||||||
|
url = "https://www.ttyingqiu.com/static/no_cache/league/zc/jsbf/ttyq2020/jczq/2022-11-06/oz_407_6.json?v=1667799791169"
|
||||||
|
|
||||||
|
match_list = data["matchList"]
|
||||||
38
pls.py
38
pls.py
|
|
@ -13,34 +13,34 @@ sum_df = pd.value_counts(sum_list)
|
||||||
|
|
||||||
# 组三
|
# 组三
|
||||||
group3 = [ i for i in l if len(set(i)) == 2]
|
group3 = [ i for i in l if len(set(i)) == 2]
|
||||||
sum_group_dict = {i: [] for i in np.arange(28)}
|
sum_group3_dict = {i: [] for i in np.arange(28)}
|
||||||
for i in group3:
|
for i in group3:
|
||||||
|
sum_group3_dict[sum(map(int, list(i)))].append(i)
|
||||||
sum_group_dict[sum(map(int, list(i)))].append(i)
|
|
||||||
|
|
||||||
for i in sum_group_dict.keys():
|
|
||||||
f3 = lambda number: True if '1' not in number else False
|
|
||||||
print(i, -cachesum_group_dict[i])
|
|
||||||
# print(sum_group3_dict)
|
|
||||||
# sum_group3 = [ sum(map(int, list(i))) for i in group3]
|
|
||||||
# print(pd.value_counts(sum_group3).to_dict())
|
|
||||||
for i in range(5, 20):
|
|
||||||
_result = [item for item in sum_group_dict[i]]
|
|
||||||
# 组六
|
# 组六
|
||||||
group6 = [ i for i in l if len(set(i)) == 3]
|
group6 = [ i for i in l if len(set(i)) == 3]
|
||||||
print(len(group6)/220)
|
|
||||||
sum_group6_dict = {i: [] for i in np.arange(28)}
|
sum_group6_dict = {i: [] for i in np.arange(28)}
|
||||||
for i in group6:
|
for i in group6:
|
||||||
sum_group6_dict[sum(map(int, list(i)))].append(i)
|
sum_group6_dict[sum(map(int, list(i)))].append(i)
|
||||||
|
# for i in sum_group3_dict.keys():
|
||||||
|
# f3 = lambda number: True if '7' not in number else False
|
||||||
|
# print(i, list(filter(f3, sum_group3_dict[i])))
|
||||||
|
# print(sum_group3_dict)
|
||||||
|
# sum_group3 = [ sum(map(int, list(i))) for i in group3]
|
||||||
|
# print(pd.value_counts(sum_group3).to_dict())
|
||||||
|
# for i in range(5, 20):
|
||||||
|
# _result = [item for item in sum_group3_dict[i]]
|
||||||
|
|
||||||
|
|
||||||
for i in sum_group6_dict.keys():
|
for i in sum_group6_dict.keys():
|
||||||
f1 = lambda number: len([i for i in number if int(i) %2 == 0]) != 0
|
f1 = lambda number: len([i for i in number if int(i) %2 == 0]) != 0
|
||||||
f2 = lambda number: len([i for i in number if int(i) %2 == 1]) != 0
|
f2 = lambda number: len([i for i in number if int(i) %2 == 1]) != 0
|
||||||
f3 = lambda number: True if '2' not in number else False
|
f3 = lambda number: True if max(map(int, number)) - min(map(int, number)) != 2 else False
|
||||||
f4 = lambda number: True if max(map(int, number)) - min(map(int, number)) != 2 else False
|
f4 = lambda number: True if '3' not in number else False
|
||||||
f5 = lambda number: True if '3' not in number else False
|
f5 = lambda number: True if '4' not in number else False
|
||||||
f3 = lambda number: True if '8' not in number else False
|
if i in [15, 19]:
|
||||||
print(i, sum_group6_dict[i])
|
result = sum_group6_dict[i]+sum_group3_dict[i]
|
||||||
# print(pd.value_counts(sum_group3).to_dict())
|
print(i, list(filter(f5, result)))
|
||||||
|
# print(i, sum_group3_dict[i])
|
||||||
|
|
||||||
# 连号
|
# 连号
|
||||||
result = []
|
result = []
|
||||||
|
|
|
||||||
33
sd.py
33
sd.py
|
|
@ -3,14 +3,43 @@ import pandas as pd
|
||||||
|
|
||||||
a = np.arange(1000)
|
a = np.arange(1000)
|
||||||
|
|
||||||
|
nums = [ f"{i:03d}" for i in a ]
|
||||||
|
is_odd = lambda i: True if int(i) % 2 == 1 else False
|
||||||
|
is_even = lambda i: True if int(i) % 2 == 0 else False
|
||||||
|
|
||||||
|
#奇奇奇
|
||||||
|
odd_odd_odd = [i for i in nums if is_odd(i[0]) and is_odd(i[1]) and is_odd(i[2]) ]
|
||||||
|
#奇奇偶
|
||||||
|
odd_odd_even = [i for i in nums if is_odd(i[0]) and is_odd(i[1]) and is_even(i[2]) ]
|
||||||
|
#
|
||||||
|
odd_even_odd = [i for i in nums if is_odd(i[0]) and is_even(i[1]) and is_odd(i[2]) ]
|
||||||
|
#
|
||||||
|
odd_even_even = [i for i in nums if is_odd(i[0]) and is_even(i[1]) and is_even(i[2])]
|
||||||
|
#
|
||||||
|
even_odd_odd = [i for i in nums if is_even(i[0]) and is_odd(i[1]) and is_odd(i[2]) ]
|
||||||
|
#奇奇偶
|
||||||
|
even_odd_even = [i for i in nums if is_even(i[0]) and is_odd(i[1]) and is_even(i[2]) ]
|
||||||
|
#
|
||||||
|
even_even_odd = [i for i in nums if is_even(i[0]) and is_even(i[1]) and is_odd(i[2]) ]
|
||||||
|
#
|
||||||
|
even_even_even = [i for i in nums if is_even(i[0]) and is_even(i[1]) and is_even(i[2])]
|
||||||
|
|
||||||
|
print(len(even_even_even))
|
||||||
|
print(len(even_even_odd))
|
||||||
|
print(len(odd_odd_even))
|
||||||
|
|
||||||
|
f = lambda x: True if '7' not in x and '5' not in x else False
|
||||||
|
result = list(filter(f, even_odd_even))
|
||||||
|
print(result)
|
||||||
|
|
||||||
l = set([ f"{i:03d}" for i in a ])
|
l = set([ f"{i:03d}" for i in a ])
|
||||||
|
|
||||||
sum_dict = dict()
|
sum_dict = dict()
|
||||||
print(len(l))
|
# print(len(l))
|
||||||
for i in l:
|
for i in l:
|
||||||
_sum = sum(map(int, i))
|
_sum = sum(map(int, i))
|
||||||
v = sum_dict.get(_sum, 0)
|
v = sum_dict.get(_sum, 0)
|
||||||
sum_dict[_sum] = v + 1
|
sum_dict[_sum] = v + 1
|
||||||
|
|
||||||
df = pd.Series(sum_dict)
|
df = pd.Series(sum_dict)
|
||||||
print(df.sort_values(ascending=False))
|
# print(df.sort_values(ascending=False))
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
import sklearn
|
||||||
|
from sklearn import linear_model, tree
|
||||||
|
|
||||||
|
# 普通最小二乘法
|
||||||
|
reg = linear_model.LinearRegression()
|
||||||
|
reg.fit([[0, 0], [1, 1], [2, 2]], [0, 1, 2])
|
||||||
|
result = reg.predict([[3, 1]])
|
||||||
|
print(reg.coef_)
|
||||||
|
print(result)
|
||||||
|
|
||||||
|
# 贝叶斯岭回归
|
||||||
|
X = [[0., 0.], [1., 1.], [2., 2.], [3., 3.]]
|
||||||
|
Y = [0., 1., 2., 3.]
|
||||||
|
reg = linear_model.BayesianRidge()
|
||||||
|
reg.fit(X, Y)
|
||||||
|
result = reg.predict([[1, 0]])
|
||||||
|
print(reg.coef_)
|
||||||
|
print(result)
|
||||||
|
|
||||||
|
# 决策树分类
|
||||||
|
X = [[0, 0], [1, 1]]
|
||||||
|
Y = [0, 1]
|
||||||
|
clf = tree.DecisionTreeClassifier()
|
||||||
|
clf = clf.fit(X, Y)
|
||||||
|
result = clf.predict([[10., 11.]])
|
||||||
|
print(result)
|
||||||
|
print(clf.predict_proba([[10., 11.]]))
|
||||||
|
# 决策树回归
|
||||||
|
X = [[0, 0], [2, 2]]
|
||||||
|
Y = [1.5, 6.5]
|
||||||
|
clf = tree.DecisionTreeRegressor()
|
||||||
|
clf = clf.fit(X, Y)
|
||||||
|
result = clf.predict([[1, 2]])
|
||||||
|
print(result)
|
||||||
Loading…
Reference in New Issue