formatting changes

This commit is contained in:
matteo-id committed 2022-05-23 19:33:13 -04:00
1 parent a0c172d11f
commit 283e893438
18 files changed
+83 -56

No files matched your search

@@ -1 +1,2 @@
1,16,18,19,20,4,4.611518915866742
Winning_Numbers,Chance
14-18-22-23-5-9,[0.19480519480519481]
1 1 Winning_Numbers 16 Chance 18 19 20 4 4.611518915866742
2 14-18-22-23-5-9 [0.19480519480519481]
@@ -23,7 +23,7 @@ df2 = df[['Date', 'Numbers']]
#print(df2)
# To excel file
df2.to_excel('../lottopy/cash25.xlsx')
df2.to_excel('./cash25.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("cash25.xlsx", sheet_name=0)
@@ -53,7 +53,7 @@ ws.xlsx_to_dict(path='cash25.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -69,9 +69,13 @@ for n in range(0, 25):
sorted_nums = sorted(likely_nums)
total_freq = sum(frequency)
chance = [(total_freq / 177100) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 177100) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "\n", "With percent chance of winning being", chance[0]*100, "%")
f = open('c25_ans.csv', 'w')
writer = csv.writer(f)
writer.writerow(sorted_nums + chance)
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
h = 'Winning_Numbers', 'Chance'
f = open('c25_ans.csv', 'w', encoding='utf_8')
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
Binary file not shown.
@@ -1 +1,2 @@
0,8,9,0.29
Winning_Numbers,Chance
0-4-6,[0.33]
1 0 Winning_Numbers 8 Chance 9 0.29
2 0-4-6 [0.33]
@@ -1 +1,2 @@
1,2,3,6,177.96
Winning_Numbers,Chance
3-5-6-8,[5.35]
1 1 Winning_Numbers 2 Chance 3 6 177.96
2 3-5-6-8 [5.35]
@@ -23,7 +23,7 @@ df2 = df[['Date', 'Numbers']]
#print(df2)
# To excel file
df2.to_excel('../lottopy/daily3.xlsx')
df2.to_excel('./daily3.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("daily3.xlsx", sheet_name=0)
@@ -53,7 +53,7 @@ ws.xlsx_to_dict(path='daily3.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -69,9 +69,14 @@ for n in range(0, 10):
sorted_nums = sorted(likely_nums)
total_freq = sum(frequency)
chance = [(total_freq / 10000) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 10000) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "\n", "With percent chance of winning being", chance[0]*100, "%")
f = open('d3_ans.csv', 'w')
writer = csv.writer(f)
writer.writerow(sorted_nums + chance)
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
h = 'Winning_Numbers', 'Chance'
f = open('d3_ans.csv', 'w', encoding='utf_8')
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
Binary file not shown.
@@ -23,7 +23,7 @@ df2 = df[['Date', 'Numbers']]
#print(df2)
# To excel file
df2.to_excel('../lottopy/daily4.xlsx')
df2.to_excel('./daily4.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("daily4.xlsx", sheet_name=0)
@@ -53,7 +53,7 @@ ws.xlsx_to_dict(path='daily4.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -69,9 +69,13 @@ for n in range(0, 9):
sorted_nums = sorted(likely_nums)
total_freq = sum(frequency)
chance = [(total_freq / 10000) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 10000) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "\n", "With percent chance of winning being", chance[0]*100, "%")
f = open('d4_ans.csv', 'w')
writer = csv.writer(f)
writer.writerow(sorted_nums + chance)
d = dict(((k, eval (k)) for k in ('Winning_Numbers','Chance')))
h = 'Winning_Numbers', 'Chance'
f = open('d4_ans.csv', 'w', encoding='utf_8')
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
Binary file not shown.
@@ -1 +1,2 @@
1,10,25,34,35,9,0.001204327885000154
Winning_Numbers,SB,Chance
1-10-32-36-8,[3],[0.00036937852063902485]
1 1 Winning_Numbers 10 SB 25 Chance 34 35 9 0.001204327885000154
2 1-10-32-36-8 [3] [0.00036937852063902485]
Binary file not shown.
@@ -1,4 +1,5 @@
# WVLottopy: Matteo DiBiagio
#from django_lottopy.lottopy_site.lottopy.lottopy_web_edition.megamil import Winning_Numbers
from sheet2dict import Worksheet
import pandas as pd
import requests
@@ -23,7 +24,7 @@ df2 = df[['Date', 'Numbers', 'SB', 'All Star']]
#print(df2)
# To excel file
df2.to_excel('../lottopy/lotto_america.xlsx')
df2.to_excel('./lotto_america.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("lotto_america.xlsx", sheet_name=0)
@@ -31,7 +32,7 @@ df = pd.read_excel("lotto_america.xlsx", sheet_name=0)
# insert the name of the column as a string in brackets
date = list(df['Date'])
nums = list(df['Numbers'].astype('str'))
PB = list(df['SB'].astype('int'))
PBs = list(df['SB'].astype('int'))
#appearances = list(df2['Winners WV Only'].astype('int'))
# Index for each row
@@ -53,7 +54,7 @@ ws.xlsx_to_dict(path='lotto_america.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -63,15 +64,20 @@ for n in range(0, 52):
frequency = [v[-1] for v in most_common]
for n in range(0, 10):
most_common_pb = Counter(PB).most_common(1)
likely_pb = [v[0] for v in most_common_pb]
most_common_pb = Counter(PBs).most_common(1)
SB = [v[0] for v in most_common_pb]
frequency_pb = [v[-1] for v in most_common_pb]
sorted_nums = sorted(likely_nums)
total_freq = sum(frequency + frequency_pb)
chance = [(total_freq / 25989600) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 25989600) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "SB:", likely_pb, "\n", "With percent chance of winning being", chance[0]*100, "%")
f = open('la_ans.csv', 'w')
writer = csv.writer(f)
writer.writerow(sorted_nums + likely_pb + chance)
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'SB', 'Chance')))
h = 'Winning_Numbers', 'SB', 'Chance'
f = open('la_ans.csv', 'w', encoding='utf_8')
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
@@ -1,5 +1,4 @@
# WVLottopy: Matteo DiBiagio
from encodings import utf_8
from sheet2dict import Worksheet
import pandas as pd
import requests
@@ -24,7 +23,7 @@ df2 = df[['Date', 'Numbers', 'PB', 'PPX', 'Winners WV Only', 'Payout WV Only']]
#print(df2)
# To excel file
df2.to_excel('../lottopy_web_edition/lotto.xlsx')
df2.to_excel('./lotto.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("lotto.xlsx", sheet_name=0)
@@ -32,7 +31,7 @@ df = pd.read_excel("lotto.xlsx", sheet_name=0)
# insert the name of the column as a string in brackets
date = list(df['Date'])
nums = list(df['Numbers'].astype('str'))
PB = list(df['PB'].astype('int'))
PBs = list(df['PB'].astype('int'))
appearances = list(df2['Winners WV Only'].astype('int'))
# Index for each row
@@ -54,7 +53,7 @@ ws.xlsx_to_dict(path='lotto.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -64,19 +63,20 @@ for n in range(0, 69):
frequency = [v[-1] for v in most_common]
for n in range(0, 26):
most_common_pb = Counter(PB).most_common(1)
likely_pb = str([v[0] for v in most_common_pb])
most_common_pb = Counter(PBs).most_common(1)
PB = [v[0] for v in most_common_pb]
frequency_pb = [v[-1] for v in most_common_pb]
sorted_nums = sorted(likely_nums)
final_nums = str("-".join(sorted_nums))
total_freq = sum(frequency + frequency_pb)
chance = str([(total_freq / 292201338) * 100]) # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 292201338) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "PB:", likely_pb, "\n", "With percent chance of winning being", chance[0]*100, "%")
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'PB', 'Chance')))
h = 'Winning_Numbers', 'PB', 'Chance'
f = open('pb_ans.csv', 'w', encoding='utf_8')
writer = csv.writer(f)
writer.writerow([final_nums])
writer.writerow([likely_nums])
writer.writerow([chance])
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
@@ -23,7 +23,7 @@ df2 = df[['Date', 'Numbers', 'MB', 'MP']]
#print(df2)
# To excel file
df2.to_excel('../lottopy/lotto_megamil.xlsx')
df2.to_excel('./lotto_megamil.xlsx')
#Insert complete path to the excel file and index of the worksheet
df = pd.read_excel("lotto_megamil.xlsx", sheet_name=0)
@@ -31,7 +31,7 @@ df = pd.read_excel("lotto_megamil.xlsx", sheet_name=0)
# insert the name of the column as a string in brackets
date = list(df['Date'])
nums = list(df['Numbers'].astype('str'))
PB = list(df['MB'].astype('int'))
PBs = list(df['MB'].astype('int'))
#appearances = list(df2['Winners WV Only'].astype('int'))
# Index for each row
@@ -53,7 +53,7 @@ ws.xlsx_to_dict(path='lotto_megamil.xlsx', select_sheet='Sheet1')
# Formatting
hyphenfree = []
for x in nums:
hyphenfree.append(x.replace('-',', '))
hyphenfree.append(x.replace('–',', '))
splitlist = ", ".join(hyphenfree)
sep = splitlist.split(", ")
@@ -63,15 +63,19 @@ for n in range(0, 70):
frequency = [v[-1] for v in most_common]
for n in range(0, 25):
most_common_pb = Counter(PB).most_common(1)
likely_pb = [v[0] for v in most_common_pb]
most_common_pb = Counter(PBs).most_common(1)
MB = [v[0] for v in most_common_pb]
frequency_pb = [v[-1] for v in most_common_pb]
sorted_nums = sorted(likely_nums)
total_freq = sum(frequency + frequency_pb)
chance = [(total_freq / 302575350) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Chance = [(total_freq / 302575350) * 100] # Chance = number call freq / all possible numbers i.e. 11238513
Winning_Numbers = str("-".join(sorted_nums))
#print("Likely numbers are . . . ", sorted_nums, "MB:", likely_pb, "\n", "With percent chance of winning being", chance[0]*100, "%")
f = open('mm_ans.csv', 'w')
writer = csv.writer(f)
writer.writerow(sorted_nums + likely_pb + chance)
d = dict(((k, eval (k)) for k in ('Winning_Numbers', 'MB', 'Chance')))
h = 'Winning_Numbers', 'MB', 'Chance'
f = open('mm_ans.csv', 'w', encoding='utf_8')
writer = csv.DictWriter(f, fieldnames=h)
writer.writeheader()
writer.writerow(d)
@@ -1 +1,2 @@
10,11,17,20,31,9,0.0002135005379651713
Winning_Numbers,MB,Chance
17-21-26-52-7,[24],[2.478721416004311e-05]
1 10 Winning_Numbers 11 MB 17 Chance 20 31 9 0.0002135005379651713
2 17-21-26-52-7 [24] [2.478721416004311e-05]
@@ -1,3 +1,2 @@
22-23-28-32-41
"['23', '32', '28', '41', '22']"
[0.0005400385948951404]
Winning_Numbers,PB,Chance
21-39-59-61-63,[17],[3.216959944242281e-05]
1 22-23-28-32-41 Winning_Numbers PB Chance
2 ['23', '32', '28', '41', '22'] 21-39-59-61-63 [17] [3.216959944242281e-05]
[0.0005400385948951404]