<commit_before>require 'sequel'
require 'sequel/extensions/schema_dumper'
require 'sequel/extensions/migration'
require 'stringio'
require 'uri'

module Taps
module Schema
	extend self

	def dump(database_url)
		db = Sequel.connect(database_url)
		db.dump_schema_migration(:indexes => false)
	end

	def indexes(database_url)
		db = Sequel.connect(database_url)
		db.dump_indexes_migration
	end

	def load(database_url, schema)
		db = Sequel.connect(database_url)
		eval(schema).apply(db, :up)
	end

	def load_indexes(database_url, indexes)
		db = Sequel.connect(database_url)
		eval(indexes).apply(db, :up)
	end

	def reset_db_sequences(database_url)
		db = Sequel.connect(database_url)
		return unless db.respond_to?(:reset_primary_key_sequence)
		db.tables.each do |table|
			db.reset_primary_key_sequence(table)
		end
	end
end
end
<commit_msg>removed stringio and uri requires from schema<commit_after>require 'sequel'
require 'sequel/extensions/schema_dumper'
require 'sequel/extensions/migration'

module Taps
module Schema
	extend self

	def dump(database_url)
		db = Sequel.connect(database_url)
		db.dump_schema_migration(:indexes => false)
	end

	def indexes(database_url)
		db = Sequel.connect(database_url)
		db.dump_indexes_migration
	end

	def load(database_url, schema)
		db = Sequel.connect(database_url)
		eval(schema).apply(db, :up)
	end

	def load_indexes(database_url, indexes)
		db = Sequel.connect(database_url)
		eval(indexes).apply(db, :up)
	end

	def reset_db_sequences(database_url)
		db = Sequel.connect(database_url)
		return unless db.respond_to?(:reset_primary_key_sequence)
		db.tables.each do |table|
			db.reset_primary_key_sequence(table)
		end
	end
end
end

{'fraction_non_alphanumeric': 0.09461856889414548, 'fraction_numerical': 0.0, 'mean_word_length': 5.583657587548638, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '3173170', 'n_tokens_mistral': 645, 'n_tokens_neox': 601, 'n_words': 122}