utils

package
v0.0.0-...-565f22a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NumIter = 13
)

Variables

View Source
var (
	Days           = []string{"Monday", "Tuesday", "Thursday", "Wednesday", "Friday", "Saturday", "Sunday"}
	YearSuccessive = map[int][]int{2020: {2021, 2022, 2023}, 2021: {2020, 2022, 2023}, 2022: {2020, 2021, 2023}, 2023: {2020, 2021, 2022}}
)
View Source
var Debug = loggdb.Debug
View Source
var Times = map[int]string{1: "morning", 2: "noon", 3: "night"}

Functions

func ContainsKey

func ContainsKey(List []map[int][]uint64, key int) bool

Check if a list of maps contains a key

func ConvertToInt

func ConvertToInt(str string) ([]uint64, error)

func ConvertToStr

func ConvertToStr(Nums []uint64) string

func DateToDay

func DateToDay(dat string) (string, error)

Get the day of the week

func FilterDups

func FilterDups(ListA, ListB []uint64) []uint64

Compare two lists and return duplicated Numbers

func GetDataFF

func GetDataFF(file string) map[string][]uint64

func GetDate

func GetDate(str string) (int, int, error)

Retrieve date from a string

func NumToDate

func NumToDate(month, year, day int) string

Create a date string

func NumToDate2

func NumToDate2(year, month, day int, entry string) string

Types

type DB

type DB struct {
	DB *sql.DB
	L  *Utils
}

func (*DB) AnalyzeDay

func (m *DB) AnalyzeDay(year int)

Analyze everyday of all monthday of a year.

func (*DB) AnalyzeEntry

func (m *DB) AnalyzeEntry(year int)

Analyzing each entry in a whole year. Getting an entry of the morning and add it run a match on it. Could be missed by 1 number.

func (*DB) AnalyzeJackPot

func (m *DB) AnalyzeJackPot() map[string]int

Return Jackpot numbers either being shown 3times straight over span of 2020-2023

func (*DB) AnalyzeM

func (m *DB) AnalyzeM(year int)

Most Used Numbers for a month

func (*DB) AnalyzeSDay

func (m *DB) AnalyzeSDay(year int)

Analyzes Everysday of all months of a year

func (*DB) AnalyzeSuccess

func (m *DB) AnalyzeSuccess()

func (*DB) AnalyzeY

func (m *DB) AnalyzeY(year int)

Most Used Numbers for a month

func (*DB) AnalyzedJackPot

func (m *DB) AnalyzedJackPot(year int) map[string]int64

Get JackPot Data Of a Year

func (*DB) ArrangeDates

func (m *DB) ArrangeDates(date, date2 string) bool

Arrange Dates. Arranging Dates By Not Repeating new dates to a corresponding old dates. For example 2023/1/1 matching to 2021/1/1 Should be instead 2021/1/1 to 2023/1/1

func (*DB) CJackpot

func (m *DB) CJackpot() error

func (*DB) CreateTable

func (m *DB) CreateTable() error

func (*DB) CreateTdaily

func (m *DB) CreateTdaily() error

func (*DB) CreateTmonth

func (m *DB) CreateTmonth() error

func (*DB) CreateTweeky

func (m *DB) CreateTweeky() error

func (*DB) FuckingFuck

func (m *DB) FuckingFuck() [][]uint64

func (*DB) GetJDates

func (m *DB) GetJDates(month, day, entry string) map[int][]string

func (*DB) GetJNumbers

func (m *DB) GetJNumbers(month, day int) (map[string]int, [][]uint64)

func (*DB) GetJackPot

func (m *DB) GetJackPot() [][]uint64

func (*DB) GetMostDate

func (m *DB) GetMostDate(year int) month

Sort Jackpot Data

func (*DB) GetMostUsed

func (m *DB) GetMostUsed(table, dayEntry string, year, day, month int) (string, error)

Get Most Used Of Sdaily GetMostUsed retrieves the most used value based on the given parameters.

func (*DB) GetjDates

func (m *DB) GetjDates(numbers string) ([]string, []string)

return dates based on a numbers.

func (*DB) ImportData

func (m *DB) ImportData(d map[string][]uint64, year, month int) error

Import data

func (*DB) ImportJack

func (m *DB) ImportJack(year, month, day, myear, mmonth, mday int, entry, mentry string, numbers []uint64) error

Import jackpot data

func (*DB) Improvedcentry

func (m *DB) Improvedcentry(row []uint64, date string, years []int) map[string][]uint64

Upgraded Version (Faster)

func (*DB) InitializeDB

func (m *DB) InitializeDB() chan error

func (*DB) InsertTo

func (m *DB) InsertTo(table string, d []DataHold) error

Insert into Other Ts

func (*DB) JackPotNumbers

func (m *DB) JackPotNumbers(year int) map[int][][]uint64

func (*DB) MarkedDates

func (m *DB) MarkedDates(month int) map[string][]map[string]int

Function to analyze dates, marking only repeated dates.

func (*DB) MarkedDates2

func (m *DB) MarkedDates2(month, day int, entry string)

Filter Numbers Return Only Used and Unused Based on Year. Analyze based on date returns a list of repeated numbers at certain date based on other dates

func (*DB) NumGetDay

func (m *DB) NumGetDay(year, day int, entry string) ([]uint64, error)

Get numbers of a particular date and with an entry.

func (*DB) NumGetDayTime

func (m *DB) NumGetDayTime(year, day, month int, entry string) ([]uint64, error)

Get numbers of a particular day and a month and with an entry.

func (*DB) NumGetMonth

func (m *DB) NumGetMonth(year, month int, entry string) ([]uint64, error)

Get all numbers of a month (with entry_time) from a particular year

func (*DB) NumGetSday

func (m *DB) NumGetSday(year, month int, sday, entry string) ([]uint64, error)

func (*DB) NumGetYear

func (m *DB) NumGetYear(year int) ([]uint64, error)

Get all numbers of a year

func (*DB) OriginalNumbers

func (m *DB) OriginalNumbers(year, month, day int, entry_time string) map[string]int64

Get original matched date

func (*DB) RetrieveDates

func (m *DB) RetrieveDates(month, day int, entry string) map[int][]map[string]string

Get Dates and their numbers Based on a date in jackpot

func (*DB) TestCJackpot

func (m *DB) TestCJackpot() error

func (*DB) Total_days

func (m *DB) Total_days(month int) int

Get total days in a month

type DataHold

type DataHold struct {
	Nums  string
	DayT  string
	Month int
	Year  int
	Day   int
}

type Job

type Job struct {
	Year       int
	Result     map[string][]uint64
	AllResults *map[string]map[string][]uint64
	// contains filtered or unexported fields
}

type Logger

type Logger struct {
	*loggdb.Logger
}

type Lott

type Lott struct {
	Utils
	DB
}

func NewApp

func NewApp() *Lott

func (*Lott) AnotherFuck

func (app *Lott) AnotherFuck()

func (*Lott) FuckingBeIt

func (app *Lott) FuckingBeIt()

func (*Lott) InsanelyLucky

func (app *Lott) InsanelyLucky()

Get everynumber from 2020/2023 and check if its repeated atleast 3times which should exactly be the same numbers. Since all the numbers would be in the same order like (1,2,3,4,5,6,7,8,9,10) Having a match would be insanely good luck

func (*Lott) MonthTwelve

func (app *Lott) MonthTwelve()

Please be luck

func (*Lott) ParserFlags

func (app *Lott) ParserFlags()

func (*Lott) SdayTable

func (app *Lott) SdayTable(Year, Month int, Sday string)

func (*Lott) ShowAnalyzed

func (app *Lott) ShowAnalyzed(Year int)

This function gets date from analyze GetMostDate()

func (*Lott) ShowAnalyzed2

func (app *Lott) ShowAnalyzed2()

func (*Lott) ShowMarked

func (app *Lott) ShowMarked(month int)

type Pair

type Pair struct {
	Number uint64
	Count  uint64
}

Pair represents a number and its count

func FromJson

func FromJson(stringPair []byte) ([]Pair, error)

Convert from json to a pair

type Result

type Result struct {
	Date    string
	Numbers []uint64
}

type Utils

type Utils struct {
	Logger Logger
}

func (*Utils) FindDupNums

func (util *Utils) FindDupNums(List []uint64, filtered bool) string

Most Used Numbers in combination

func (*Utils) FormatDate

func (Util *Utils) FormatDate(month, day int, entry string) string

Format Date into a string

func (*Utils) HandleError

func (util *Utils) HandleError(err error)

func (*Utils) ReadNumbers

func (util *Utils) ReadNumbers(file string) []uint64

func (*Utils) ReadfromFile

func (Util *Utils) ReadfromFile() []byte

Reads json from a file.

func (*Utils) SaveToFile

func (Util *Utils) SaveToFile(content []byte)

Save Json to a file

func (*Utils) SetLogger

func (util *Utils) SetLogger()

func (*Utils) SplitDate

func (Util *Utils) SplitDate(c string) (string, string)

Split A string date

func (*Utils) SplitDateV2

func (Util *Utils) SplitDateV2(c string) (string, string)

Split a string date v2

type VarsUsed

type VarsUsed struct {
	File         string
	HtmlFile     string
	Month        int
	Year         int
	Day          int
	Sday         string
	Entry        string
	Aday         bool
	Asday        bool
	Amonth       bool
	Ayear        bool
	EntryAnalyze bool
	Debug        bool
}

func Parse

func Parse() *VarsUsed

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL