Implementation of apriori algorithm, code