Added support for historical numbers dating back to 1992 in some cases

This commit is contained in:
lottopy committed 2022-06-29 16:13:44 -04:00
1 parent 94a108b248
commit 26f84a9a7b
20 files changed
+35 -17

No files matched your search

+2 -2
View File
@@ -1,2 +1,2 @@
# Excel # Redis?
*.xlsx dump.rdb
+2
View File
@@ -7,3 +7,5 @@ Previously there were records dating back to 1992 that were removed by the websi
I am welcoming anyone who wants to to port it to their own state to do so. I currently have a website hosting my numbers to be refreshed daily. Collaboration and suggestion at a more accurate algorithm is also welcome. I am welcoming anyone who wants to to port it to their own state to do so. I currently have a website hosting my numbers to be refreshed daily. Collaboration and suggestion at a more accurate algorithm is also welcome.
Good luck! Good luck!
Old numbers have been re-added to analysis.
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,Chance Winning_Numbers,Chance
14-18-2-22-5-9,31/16100 14-16-18-2-22-9,171/88550
1 Winning_Numbers Chance
2 14-18-2-22-5-9 14-16-18-2-22-9 31/16100 171/88550
+4 -1
View File
@@ -6,6 +6,9 @@ from collections import Counter
import csv import csv
def get_data(): def get_data():
df_old = pd.read_excel('./excel_lotto_records/cash25.xlsx')
salvaged = df_old[['Date', 'Numbers']]
url = 'https://wvlottery.com/draw-games/cash-25/?game-analyze=cash-25&what-to-search=historysearch&date-range=-1' url = 'https://wvlottery.com/draw-games/cash-25/?game-analyze=cash-25&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
@@ -17,7 +20,7 @@ def get_data():
dfs = pd.read_html(r.text) dfs = pd.read_html(r.text)
pd.set_option('display.max_rows', None) pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records # Specifies no max rows, otherwise only shows 10 records
df = dfs[0] df = dfs[0].append(salvaged, ignore_index=True)
df2 = df[['Date', 'Numbers']] df2 = df[['Date', 'Numbers']]
date = list(df2['Date']) date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str')) nums = list(df2['Numbers'].astype('str'))
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,Chance Winning_Numbers,Chance
0-3-8,3/100 2-3-6,10123/15000
1 Winning_Numbers Chance
2 0-3-8 2-3-6 3/100 10123/15000
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,Chance Winning_Numbers,Chance
3-5-6-8,67/1250 3-5-6-8,27/500
1 Winning_Numbers Chance
2 3-5-6-8 67/1250 27/500
+3 -2
View File
@@ -4,9 +4,10 @@ import pandas as pd
import requests import requests
from collections import Counter from collections import Counter
import csv import csv
from datetime import datetime
def get_data(): def get_data():
url = 'https://wvlottery.com/draw-games/daily-3/?game-analyze=daily-3&what-to-search=historysearch&date-range=1' url = 'https://wvlottery.com/draw-games/daily-3/?game-analyze=daily-3&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest" "X-Requested-With": "XMLHttpRequest"
@@ -38,7 +39,7 @@ for n in range(0, 10):
sorted_nums = sorted(likely_nums) sorted_nums = sorted(likely_nums)
total_freq = sum(frequency) total_freq = sum(frequency)
Chance = frac(total_freq, 1000) # Chance = number call freq / all possible numbers i.e. 1000 Chance = frac(total_freq, 15000) # Chance = number call freq / all possible numbers i.e. 1000
Winning_Numbers = str("-".join(sorted_nums)) Winning_Numbers = str("-".join(sorted_nums))
#print(f"Likely numbers are . . . {Winning_Numbers} \n" #print(f"Likely numbers are . . . {Winning_Numbers} \n"
+5 -2
View File
@@ -6,6 +6,9 @@ from collections import Counter
import csv import csv
def get_data(): def get_data():
df_old = pd.read_excel('./excel_lotto_records/daily4.xlsx')
salvaged = df_old[['Date', 'Numbers']]
url = 'https://wvlottery.com/draw-games/daily-4/?game-analyze=daily-4&what-to-search=historysearch&date-range=-1' url = 'https://wvlottery.com/draw-games/daily-4/?game-analyze=daily-4&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
@@ -16,7 +19,7 @@ def get_data():
dfs = pd.read_html(r.text) dfs = pd.read_html(r.text)
pd.set_option('display.max_rows', None) pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records # Specifies no max rows, otherwise only shows 10 records
df = dfs[0] df = dfs[0].append(salvaged, ignore_index=True)
df2 = df[['Date', 'Numbers']] df2 = df[['Date', 'Numbers']]
date = list(df2['Date']) date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str')) nums = list(df2['Numbers'].astype('str'))
@@ -41,7 +44,7 @@ total_freq = sum(frequency)
Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000 Chance = frac(total_freq, 10000) # Chance = number call freq / all possible numbers i.e. 10000
Winning_Numbers = str("-".join(sorted_nums)) Winning_Numbers = str("-".join(sorted_nums))
#print(f"Likely numbers are . . . {Winning_Numbers}, \n" #print(f"Likely numbers are . . . {Winning_Numbers} \n"
#f"With percent chance of winning being {Chance}") #f"With percent chance of winning being {Chance}")
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance'))) d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,SB,Chance Winning_Numbers,SB,Chance
1-10-27-32-8,[9],1/270725 1-10-32-46-48,[9],47/8663200
1 Winning_Numbers SB Chance
2 1-10-27-32-8 1-10-32-46-48 [9] 1/270725 47/8663200
+5 -2
View File
@@ -7,10 +7,13 @@ from collections import Counter
import csv import csv
def get_data(): def get_data():
df_old = pd.read_excel('./excel_lotto_records/lotto_america.xlsx')
salvaged = df_old[['Date', 'Numbers', 'SB']]
url = 'https://wvlottery.com/draw-games/lotto-america/?game-analyze=lotto-america&what-to-search=historysearch&date-range=-1' url = 'https://wvlottery.com/draw-games/lotto-america/?game-analyze=lotto-america&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
"X-Requested-With": "XMLHttpRequest" "X-Requeste, 'PPX', 'Winners WV Only', 'Payout WV Onlyd-With": "XMLHttpRequest"
} }
# Get web data # Get web data
@@ -18,7 +21,7 @@ def get_data():
dfs = pd.read_html(r.text) dfs = pd.read_html(r.text)
pd.set_option('display.max_rows', None) pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records # Specifies no max rows, otherwise only shows 10 records
df = dfs[0] df = dfs[0].append(salvaged, ignore_index=True)
df2 = df[['Date', 'Numbers', 'SB', 'All Star']] df2 = df[['Date', 'Numbers', 'SB', 'All Star']]
date = list(df2['Date']) date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str')) nums = list(df2['Numbers'].astype('str'))
+4 -1
View File
@@ -6,6 +6,9 @@ from collections import Counter
import csv import csv
def get_data(): def get_data():
df_old = pd.read_excel('./excel_lotto_records/lotto.xlsx')
salvaged = df_old[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
url = 'https://wvlottery.com/draw-games/powerball/?game-analyze=powerball&what-to-search=historysearch&date-range=-1' url = 'https://wvlottery.com/draw-games/powerball/?game-analyze=powerball&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
@@ -16,7 +19,7 @@ def get_data():
dfs = pd.read_html(r.text) dfs = pd.read_html(r.text)
pd.set_option('display.max_rows', None) pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records # Specifies no max rows, otherwise only shows 10 records
df = dfs[0] df = dfs[0].append(salvaged, ignore_index=True)
df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']] df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
date = list(df2['Date']) date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str')) nums = list(df2['Numbers'].astype('str'))
+4 -1
View File
@@ -7,6 +7,9 @@ import csv
def get_data(): def get_data():
df_old = pd.read_excel('./excel_lotto_records/lotto_megamil.xlsx')
salvaged = df_old[['Date', 'Numbers', 'MB']]
url = 'https://wvlottery.com/draw-games/mega-millions/?game-analyze=mega-millions&what-to-search=historysearch&date-range=-1' url = 'https://wvlottery.com/draw-games/mega-millions/?game-analyze=mega-millions&what-to-search=historysearch&date-range=-1'
header = { header = {
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36", "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.75 Safari/537.36",
@@ -18,7 +21,7 @@ def get_data():
dfs = pd.read_html(r.text) dfs = pd.read_html(r.text)
pd.set_option('display.max_rows', None) pd.set_option('display.max_rows', None)
# Specifies no max rows, otherwise only shows 10 records # Specifies no max rows, otherwise only shows 10 records
df = dfs[0] df = dfs[0].append(salvaged, ignore_index=True)
df2 = df[['Date', 'Numbers', 'MB', 'MP']] df2 = df[['Date', 'Numbers', 'MB', 'MP']]
date = list(df2['Date']) date = list(df2['Date'])
nums = list(df2['Numbers'].astype('str')) nums = list(df2['Numbers'].astype('str'))
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,MB,Chance Winning_Numbers,MB,Chance
17-3-40-52-7,[24],38/151287675 17-21-3-40-7,[9],131/302575350
1 Winning_Numbers MB Chance
2 17-3-40-52-7 17-21-3-40-7 [24] [9] 38/151287675 131/302575350
+1 -1
View File
@@ -1,2 +1,2 @@
Winning_Numbers,PB,Chance Winning_Numbers,PB,Chance
21-39-59-61-63,[17],50/146100669 21-39-48-61-63,[18],193/292201338
1 Winning_Numbers PB Chance
2 21-39-59-61-63 21-39-48-61-63 [17] [18] 50/146100669 193/292201338