<commit_before>const gulp = require('gulp');
const async = require('async');
const fs = require('fs');
const rimraf = require('rimraf');
const zip = require('gulp-zip');
const util = require('gulp-util');
const electron = require('gulp-atom-electron');
const symdest = require('gulp-symdest');
const git = require('gulp-git');
const exec = require('child_process').exec;

//CONFIG
const BUILD_DIR = 'build';
const PACKAGES = `${BUILD_DIR}/packages`;
const BOT = `${BUILD_DIR}/gofbot`;

gulp.task('python:install', callback => {
    async.waterfall([
        cb => rimraf(PACKAGES, cb),
        cb => async.concat(fs.readFileSync('build/gofbot/requirements.txt')
            .toString()
            .split('\n')
            .map(dep => dep.trim().replace('-e ', '')), (cmd, _) => exec(`pip install ${cmd} --target ${PACKAGES}`, _), err => cb(err)),
        cb => fs.open(`${PACKAGES}/google/__init__.py`, 'wx', cb),
        (file, cb) => fs.close(file, cb)
    ], callback);
});

gulp.task('python:package', ['python:install'], () => {
    return gulp.src(`${PACKAGES}/**/!(*.pyc|*.egg-info)`)
        .pipe(zip('packages.zip'))
        .pipe(gulp.dest('build'))
});

const PACKAGE_SRC = ['app/**', 'LICENSE', 'gofbot/**/*', 'package.json', 'main.js'];

gulp.task('electron:osx', ['python:package'], () => {
    return gulp.src(PACKAGE_SRC, {base: '.'})
        .pipe(electron({
            version: '1.3.3',
            platform: 'darwin',
            darwinIcon: 'src/assets/resources/image/icons/pokemon.icns',
            darwinBundleIdentifier: 'com.github.pokemongof'
        })).pipe(symdest('build'));
});

gulp.task('electron:windows', ['python:package'], () => {
    return gulp.src(PACKAGE_SRC.concat('pywin/**/*'), {base: '.'})
        .pipe(electron({
            version: '1.3.3',
            platform: 'win32',
            arch: 'ia32',
            winIcon: 'src/assets/resources/image/icons/pokemon.ico',
            companyName: 'PokemonGoF',
            copyright: '2016 PokemonGOF, All Rights Reserved.'
        }))
        .pipe(zip('app-windows.exe'))
        .pipe(gulp.dest('build/'));
});


gulp.task('gofbot:update', (callback) => {
    async.series([
        _ => git.exec({args: `submodule deinit -f ${BOT}`}, _),
        _ => git.updateSubmodule({ args: '--init' }, _)
    ], callback);
});

gulp.task('gofbot:prune', ['gofbot:update'], (callback) => {
    async.parallel([
        _ => rimraf(`${BOT}/docs`, _),
        _ => rimraf(`${BOT}/web`, _),
        _ => rimraf(`${BOT}/.github`, _),
        _ => rimraf(`${BOT}/tests`, _),
        _ => async.concat(['ws_server.py', 'run.sh', 'setup.sh', 'README.md', 'pylint-recursive.py', 'run.bat',
            'LICENSE', 'Dockerfile', 'install.sh', 'CONTRIBUTORS.md', 'docker-compose.yml', '.travis.yml', '.styles.yapf',
            '.pylintrc', '.mention-bot', '.pullapprove.yml', '.gitmodules', '.dockerignore', '.gitignore'].map(x => `${BOT}/${x}`), fs.unlink, _)
    ], callback);
});

gulp.task('build', ['python:package', 'electron:osx', 'electron:windows']);<commit_msg>Revert "Adding pruning"<commit_after>const gulp = require('gulp');
const async = require('async');
const fs = require('fs');
const rimraf = require('rimraf');
const zip = require('gulp-zip');
const util = require('gulp-util');
const electron = require('gulp-atom-electron');
const symdest = require('gulp-symdest');
const git = require('gulp-git');
const exec = require('child_process').exec;

const BUILD_DIR = 'build';
const PACKAGES = `${BUILD_DIR}/packages`;

gulp.task('python:install', callback => {
    async.waterfall([
        cb => rimraf(PACKAGES, cb),
        cb => async.concat(fs.readFileSync('build/gofbot/requirements.txt')
            .toString()
            .split('\n')
            .map(dep => dep.trim().replace('-e ', '')), (cmd, _) => exec(`pip install ${cmd} --target ${PACKAGES}`, _), err => cb(err)),
        cb => fs.open(`${PACKAGES}/google/__init__.py`, 'wx', cb),
        (file, cb) => fs.close(file, cb)
    ], callback);
});

gulp.task('python:package', ['python:install'], () => {
    return gulp.src(`${PACKAGES}/**/!(*.pyc|*.egg-info)`)
        .pipe(zip('packages.zip'))
        .pipe(gulp.dest('build'))
});

const PACKAGE_SRC = ['app/**', 'LICENSE', 'gofbot/**/*', 'package.json', 'main.js'];

gulp.task('electron:osx', ['python:package'], () => {
    return gulp.src(PACKAGE_SRC, {base: '.'})
        .pipe(electron({
            version: '1.3.3',
            platform: 'darwin',
            darwinIcon: 'src/assets/resources/image/icons/pokemon.icns',
            darwinBundleIdentifier: 'com.github.pokemongof'
        })).pipe(symdest('build'));
});

gulp.task('electron:windows', ['python:package'], () => {
    return gulp.src(PACKAGE_SRC.concat('pywin/**/*'), {base: '.'})
        .pipe(electron({
            version: '1.3.3',
            platform: 'win32',
            arch: 'ia32',
            winIcon: 'src/assets/resources/image/icons/pokemon.ico',
            companyName: 'PokemonGoF',
            copyright: '2016 PokemonGOF, All Rights Reserved.'
        }))
        .pipe(zip('app-windows.exe'))
        .pipe(gulp.dest('build/'));
});

gulp.task('gofbot:reset', () => {
    return gulp.src('gofbot/*')
        .pipe(git.fetch('origin', 'master'))
        .pipe(git.reset('HEAD', {args:'--hard origin/master'}))
        .pipe(git.clean({args: '-f'}));
});

gulp.task('build', ['python:package', 'electron:osx', 'electron:windows']);
{'fraction_non_alphanumeric': 0.22935442339525475, 'fraction_numerical': 0.005149898841272761, 'mean_word_length': 3.088721804511278, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 36, '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': '1587012', 'n_tokens_mistral': 1887, 'n_tokens_neox': 1846, 'n_words': 299}