Skip to content

dylan-whynot/whynot-ssq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

whynot-ssq

提供对双色球历史数据进行查询和聚合操作

一个基于cobra的命令行demo工具 目的是练手golang和cobra

操作命令

命令 说明
update-data 更新双色球的历史数据
version 查看当前的最新版本
search 提供对历史数据的检索和查询功能
match-count 提供统计功能
match-next 根据蓝球号码,统计下一期每种球出现的次数
match-range 统计蓝球固定时,红球落入某个区间的数量

update-data

参数 参数简称 类型 默认值 说明
--cookie -c string - 提供的cookie信息

search

参数 参数简称 类型 默认值 说明
--issues - []string - 需要搜索的期号
--blue -b []string - 需要统计或者过滤的蓝球号码
--start-year -s string - 统计开始年份包含
--end-year -e string - 统计结束年份不包含
--week -w string - 星期
--pagesize -p int 50 打印多少条数据 -1表示不限制
# 检索星期日蓝球为06的数据
.\whynot_ssq.exe search --week 日  --blue 6
db init
已经加载  1687 条数据
########输出结果### 2024-03-24 22:25:24
查询条件:期号[] 星期[日] 蓝球[06] 年份区间[,)
序号    期号    日期    星期    红球    蓝球    销售额(元)      奖金池(元)
-----------------------------------------
1        2024026         2024-03-10      日      [04 07 18 19 20 25]     06      431419382       2274290656
2        2023066         2023-06-11      日      [02 07 08 10 26 31]     06      393592226       2060647554
3        2023030         2023-03-19      日      [02 03 07 16 30 31]     06      407635670       1984712961
4        2023012         2023-02-05      日      [03 04 07 22 26 30]     06      377681908       1776074467
5        2023009         2023-01-29      日      [03 04 19 23 30 32]     06      370445322       1812003410
    06      405193314       146756785
########输出结果### 2024-03-24 22:25:24
# 根据期号检索数据
>.\whynot_ssq.exe search --issues=2024026 --issues=2013030
db init
已经加载  1687 条数据
########输出结果### 2024-03-24 22:47:04
查询条件:期号[2024026 2013030] 星期[] 蓝球[] 年份区间[,)
序号    期号    日期    星期    红球    蓝球    销售额(元)      奖金池(元)
-----------------------------------------
1        2024026         2024-03-10      日      [04 07 18 19 20 25]     06      431419382       2274290656
2        2013030         2013-03-17      日      [07 14 18 25 26 29]     06      405193314       146756785
########输出结果### 2024-03-24 22:47:04

match-count

参数 参数简称 类型 默认值 说明
--blue -b []string - 需要统计或者过滤的蓝球号码
--start-year -s string - 统计开始年份包含
--end-year -e string - 统计结束年份不包含
--week -w string - 星期
--pagesize -p int 50 打印多少条数据 -1表示不限制
--print-issues -i bool false 打印期号
--red-count -r string 1 红球组合数
--granter-than -g string 0 输出结果时筛选出现次数大于n
--ball-color - string blue 球的颜色 [可选项 blue red]
# 统计蓝球为06时 年份[2015,-)时 统计不同3位红球组合出现的次数
.\whynot_ssq.exe match-count --ball-color red --blue 6 --start-year 2015 --red-count 3 -i true 
########统计出现次数### 2024-03-24 22:49:12
统计条件蓝球[06] 星期[-] 选择年份[2015,-), 统计颜色[red] [3]红球组合 出现频率大于[0]
总结果数: 1460
序号    颜色    号码    频率    期号
---------------------------
1        red     07_09_16        5       [2021038 2020036 2019059 2016153 2015001]
2        red     08_25_32        4       [2023003 2021018 2018099 2016098]
3        red     13_14_28        3       [2020027 2017087 2017056]
4        red     05_16_18        3       [2022003 2021038 2019059]
5        red     05_12_27        3       [2019094 2018044 2016007]
6        red     15_24_26        3       [2023071 2022068 2021130]
7        red     12_15_26        3       [2023071 2022068 2021088]
8        red     07_09_23        3       [2017088 2015102 2015001]
9        red     12_15_24        3       [2023071 2023041 2022068]
10       red     07_09_18        3       [2021038 2019059 2017088]
11       red     21_23_32        3       [2021076 2020090 2018032]
12       red     08_11_28        3       [2017094 2017013 2015128]
13       red     13_18_28        3       [2023008 2022117 2017056]
...
# 统计2015年后蓝球出现的频率
>.\whynot_ssq.exe match-count --start-year 2015                                                 
########统计出现次数### 2024-03-24 22:51:48
统计条件蓝球[] 星期[-] 选择年份[2015,-), 统计颜色[blue] [1]红球组合 出现频率大于[0]
总结果数: 16
序号    颜色    号码    频率
---------------------------
1        blue    01      107
2        blue    15      101
3        blue    04      99
4        blue    16      97
5        blue    07      96
6        blue    12      94
7        blue    08      84
8        blue    03      84
9        blue    06      83
10       blue    05      82
11       blue    14      82
12       blue    09      77
13       blue    02      76
14       blue    11      75
15       blue    10      74
16       blue    13      70
########输出结果### 2024-03-24 22:51:48

match-next

参数 参数简称 类型 默认值 说明
--blue -b []string - 需要统计或者过滤的蓝球号码
--start-year -s string - 统计开始年份包含
--end-year -e string - 统计结束年份不包含
--week -w string - 星期
--pagesize -p int 50 打印多少条数据 -1表示不限制
--print-issues -i bool false 打印期号
--red-count -r string 1 红球组合数
--granter-than -g string 0 输出结果时筛选出现次数大于n
--ball-color - string blue 球的颜色 [可选项 blue red]
# 蓝球为【10】时 下一期蓝球号码的频率
>whynot_ssq.exe match-next -b 10 
########统计下一期数值出现频率### 2024-03-24 22:54:58
条件蓝球[10] 星期[-] 选择年份[-,-)  统计颜色[blue] [1]红球组合 统计次数大于[0]
总结果数: 16
序号    颜色    号码    频率
--------------------------------------------------
1        blue    02      9
2        blue    15      9
3        blue    12      8
4        blue    01      8
5        blue    09      7
6        blue    03      7
7        blue    04      7
8        blue    16      6
9        blue    05      6
10       blue    07      5
11       blue    14      5
12       blue    08      4
13       blue    10      3
14       blue    11      3
15       blue    13      3
16       blue    06      3
########输出结果### 2024-03-24 22:54:58
# 统计范围[2015,-),蓝球为【06】时 下一期哪【3】种红球组合出现的频率较高
whynot_ssq.exe match-next -b 06 --ball-color red -r 3 --start-year 2015 
########统计下一期数值出现频率### 2024-03-24 22:57:31
条件蓝球[06] 星期[-] 选择年份[2015,-)  统计颜色[red] [3]红球组合 统计次数大于[0]
总结果数: 1449
序号    颜色    号码    频率
--------------------------------------------------
1        red     15_29_33        4
2        red     02_27_28        3
3        red     02_23_28        3
4        red     02_15_29        3
5        red     07_15_16        3
6        red     07_16_25        3
7        red     01_22_28        3
8        red     02_29_33        3
9        red     19_28_32        3
10       red     18_20_23        3
11       red     01_03_28        3
12       red     18_19_24        3
13       red     06_25_33        3
14       red     10_22_29        3
15       red     12_24_28        3
16       red     02_15_33        3
17       red     07_13_29        2
18       red     04_30_32        2
19       red     29_31_33        2
20       red     25_28_32        2
21       red     22_23_27        2
22       red     20_23_33        2
23       red     19_30_31        2
24       red     19_23_32        2
25       red     20_27_30        2
26       red     21_27_33        2
27       red     19_24_28        2
28       red     21_23_33        2
29       red     21_23_27        2
30       red     19_30_32        2
31       red     19_24_32        2
32       red     24_28_32        2
33       red     01_13_24        2
34       red     16_21_25        2
35       red     12_17_24        2
36       red     12_13_23        2
37       red     16_20_21        2
38       red     06_26_29        2
39       red     07_20_25        2
40       red     03_10_27        2
41       red     05_18_27        2
42       red     10_15_22        2
43       red     03_18_33        2

match-range

About

golang cobra demo

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages