<commit_before>require 'gems'
require 'pmap'

def packages_clear(db)

	packages = db[:packages]
	packages.delete

end

def packages_update(db)

	packages = db[:packages]
	packages_txt = `python3 lib/packages.py`

	db.transaction do
		packages_txt.lines.peach do |line|
			category, name, version, revision, slot, r19_target, r20_target, r21_target = line.split(' ')
			gem_version = Gems.info(name)['version']
			packages.insert(
				:category => category,
				:name => name,
				:version => version,
				:revision => revision,
				:slot => slot,
				:identifier => category + '/' + name + '-' + version + '-' + revision + ':' + slot,<commit_msg>Don't use slot in full package name<commit_after>require 'gems'
require 'pmap'

def packages_clear(db)

	packages = db[:packages]
	packages.delete

end

def packages_update(db)

	packages = db[:packages]
	packages_txt = `python3 lib/packages.py`

	db.transaction do
		packages_txt.lines.peach do |line|
			category, name, version, revision, slot, r19_target, r20_target, r21_target = line.split(' ')
			gem_version = Gems.info(name)['version']
			packages.insert(
				:category => category,
				:name => name,
				:version => version,
				:revision => revision,
				:slot => slot,
				:identifier => category + '/' + name + '-' + version + '-' + revision,
{'fraction_non_alphanumeric': 0.1460415065334358, 'fraction_numerical': 0.010760953112990008, 'mean_word_length': 3.913207547169811, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2050227', 'n_tokens_mistral': 492, 'n_tokens_neox': 426, 'n_words': 104}