Esempio n. 1
0
        # 6 = Starter,   7 = Consolation
from date_simulator import date_creator
from file_handler import write_to
        # str_combine() has to be used to produce string data suitable for saving into txt file



### ===== generate dates for Wed, Sat, Sun. Used in url to parse draw result. ===== ###
YEAR = int(raw_input("Please enter year\n"))

wed = []
sat = []
sun = []
month_count = 1
while month_count < 13:
    wed.append(date_creator(YEAR,month_count)[0])
    sat.append(date_creator(YEAR,month_count)[1])
    sun.append(date_creator(YEAR,month_count)[2])
    month_count +=1
            ## jan_2014 = date_creator(2014, 1)
            ##    ...
            ## dec_2014 = date_creator(2014, 12)

            ## wed_2014 = [jan_2014[0],..., dec_2014[0]]
            ## sat_2014 = [jan_2014[1],..., dec_2014[1]]
            ## sun_2014 = [jan_2014[2],..., dec_2014[2]]


### ===== put dates generated to web parser to get data ===== ###
wed_result = []
wed_day_result = []
Esempio n. 2
0
from num_cat_sort_module import num_cat_sorter
        # num_cat_sorter(combined_result, desired num_cat)
        # 1 = i24    2 = i12    3 = i4    4 = i1    0 = i6
        # only num from desired_num cat are returned
from num_cat_sort_module import result_separator
        # return a list with all result separated according to num_cat
        # [0] = i24     [1] = i12       [2] = i6
        # [3] = i4      [4] = i1  

from date_simulator import date_creator

from file_handler import write_to
        # str_combine() has to be used to produce string data suitable for saving into txt file
YEAR = 2012

jan = date_creator(YEAR, 1)
feb = date_creator(YEAR, 2)
mar = date_creator(YEAR, 3)
apr = date_creator(YEAR, 4)
may = date_creator(YEAR, 5)
jun = date_creator(YEAR, 6)
jul = date_creator(YEAR, 7)
aug = date_creator(YEAR, 8)
sep = date_creator(YEAR, 9)
octo = date_creator(YEAR, 10)
nov = date_creator(YEAR, 11)
dec = date_creator(YEAR, 12)

wed = [jan[0],feb[0],mar[0],apr[0],may[0],jun[0],jul[0],aug[0],sep[0],octo[0],nov[0],dec[0]]
sat = [jan[1],feb[1],mar[1],apr[1],may[1],jun[1],jul[1],aug[1],sep[1],octo[1],nov[1],dec[1]]
sun = [jan[2],feb[2],mar[2],apr[2],may[2],jun[2],jul[2],aug[2],sep[2],octo[2],nov[2],dec[2]]