<commit_before>var fs = require('fs');
var crypto = require('crypto');
var zlib = require('zlib');
var path = require('path');
var url = require('url');
var qs = require('querystring');
var Buffer = require('buffer').Buffer;
var sm = new (require('@mapbox/sphericalmercator'));
var sqlite3 = require('sqlite3');
var tiletype = require('@mapbox/tiletype');
var ZXYStream = require('./zxystream');
var queue = require('d3-queue').queue;

function noop(err) {
    if (err) throw err;
}

function hash(z, x, y) {
    return (1 << z) * ((1 << z) + x) + y;
}

// MBTiles
// -------
// MBTiles class for doing common operations (schema setup, tile reading,
// insertion, etc.)
module.exports = MBTiles;
MBTiles.schema = fs.readFileSync(__dirname + '/schema.sql', 'utf8');

// Provides access to an mbtiles database file.
// - uri: A parsed URL hash, the only relevant part is `pathname`.<commit_msg>Add path.join so that pkg could auto detect assets (#80)<commit_after>var fs = require('fs');
var crypto = require('crypto');
var zlib = require('zlib');
var path = require('path');
var url = require('url');
var qs = require('querystring');
var Buffer = require('buffer').Buffer;
var sm = new (require('@mapbox/sphericalmercator'));
var sqlite3 = require('sqlite3');
var tiletype = require('@mapbox/tiletype');
var ZXYStream = require('./zxystream');
var queue = require('d3-queue').queue;

function noop(err) {
    if (err) throw err;
}

function hash(z, x, y) {
    return (1 << z) * ((1 << z) + x) + y;
}

// MBTiles
// -------
// MBTiles class for doing common operations (schema setup, tile reading,
// insertion, etc.)
module.exports = MBTiles;
MBTiles.schema = fs.readFileSync(path.join(__dirname + '/schema.sql'), 'utf8');

// Provides access to an mbtiles database file.
// - uri: A parsed URL hash, the only relevant part is `pathname`.
{'fraction_non_alphanumeric': 0.18008705114254625, 'fraction_numerical': 0.007616974972796518, 'mean_word_length': 4.2542857142857144, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 3, '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': '5673991', 'n_tokens_mistral': 611, 'n_tokens_neox': 594, 'n_words': 190}