tslint:disable:no-console
499334
function checkNodeModules(logOutput, purgeIfStale) {
  var yarnCheck = childProcess.spawnSync(
      'yarn check --integrity', {shell: true, cwd: path.resolve(__dirname, '../..')});

  var nodeModulesOK = yarnCheck.status === 0;
  if (nodeModulesOK) {
    if (logOutput) console.log(':-) npm dependencies are looking good!');
  } else {
    if (logOutput) console.error(':-( npm dependencies are stale or in an in unknown state!');
    if (purgeIfStale) {
      if (logOutput) console.log('    purging...');
      _deleteDir(path.join(PROJECT_ROOT, 'node_modules'));
    }
  }

  return nodeModulesOK;
}
854514
function gulpEslint(options) {
	options = migrateOptions(options) || {};
	const linter = new CLIEngine(options);

	return transform((file, enc, cb) => {
		const filePath = relative(process.cwd(), file.path);

		if (file.isNull()) {
			cb(null, file);
			return;
		}

		if (file.isStream()) {
			cb(new PluginError('gulp-eslint', 'gulp-eslint doesn\'t support vinyl files with Stream contents.'));
			return;
		}

		if (linter.isPathIgnored(filePath)) {
			// Note:
			// Vinyl files can have an independently defined cwd, but ESLint works relative to `process.cwd()`.
			// (https://github.com/gulpjs/gulp/blob/master/docs/recipes/specifying-a-cwd.md)
			// Also, ESLint doesn't adjust file paths relative to an ancestory .eslintignore path.
			// E.g., If ../.eslintignore has "foo/*.js", ESLint will ignore ./foo/*.js, instead of ../foo/*.js.
			// Eslint rolls this into `CLIEngine.executeOnText`. So, gulp-eslint must account for this limitation.

			if (linter.options.ignore && options.warnFileIgnored) {
				// Warn that gulp.src is needlessly reading files that ESLint ignores
				file.eslint = createIgnoreResult(file);
			}
			cb(null, file);
			return;
		}

		let result;

		try {
			result = linter.executeOnText(file.contents.toString(), filePath).results[0];
		} catch (e) {
			cb(new PluginError('gulp-eslint', e));
			return;
		}
		// Note: Fixes are applied as part of "executeOnText".
		// Any applied fix messages have been removed from the result.

		if (options.quiet) {
			// ignore warnings
			file.eslint =  filterResult(result, options.quiet);
		} else {
			file.eslint = result;
		}

		// Update the fixed output; otherwise, fixable messages are simply ignored.
		if (file.eslint.hasOwnProperty('output')) {
			file.contents = Buffer.from(file.eslint.output);
			file.eslint.fixed = true;
		}
		cb(null, file);
	});
}
1151232
function lintCSS (args = []) {
  if (!Array.isArray(args)) {
    throw new TypeError('arguments has to be an array')
  }

  const command = [
    `node ${resolveBin('stylelint')}`,
    '"src/**/*.?(s)css"',
    '--syntax scss',
    `--custom-formatter ${require.resolve('stylelint-codeframe-formatter')}`,
    ...args
  ].join(' ')

  console.log(chalk`\nCommand:\n{green ${command}}\n`)

  try {
    execSync(command, { stdio: 'inherit' })
  } catch (error) {
    return false
  }

  return true
}
822677
function configureDebugMode (logLevel) {
  // because Listr logs to stdout (not configurable), make debug() do the same
  // otherwise file redirection gets very confusing
  debug.log = function () {
    const line = util.format.apply(util, arguments) + '\n'
    process.stdout.write(line)
  }

  // TTY-related configuration
  const supportsANSI = tty.isatty(process.stdout.fd)
  debug.useColors = () => supportsANSI
  if (!supportsANSI) {
    overrideDebugFormat()
  }

  // enable the right log levels
  if (logLevel === 'trace') debug.enable('*')
  if (logLevel === 'debug') debug.enable('thumbsup:error,thumbsup:warn,thumbsup:info,thumbsup:debug')
  if (logLevel === 'info') debug.enable('thumbsup:error,thumbsup:warn,thumbsup:info')

  // capture any additional console.log() calls, including Listr task updates
  console.log = require('debug')('thumbsup:info')
  console.info = require('debug')('thumbsup:info')
  console.warn = require('debug')('thumbsup:warn')
  console.error = require('debug')('thumbsup:error')
}
717462
function lint (options) {
  if (!options.language) {
    throw new Error('options.language missing')
  }

  if (!Array.isArray(options.arguments)) {
    throw new TypeError('options.arguments has to be an array')
  }

  process.env.NODE_ENV = 'development'

  if (options.language === 'css') {
    process.env.PANGOLIN_ENV = 'lint:css'

    lintCSS(options.arguments)
      ? process.exit(0)
      : process.exit(1)
  }

  if (options.language === 'js') {
    process.env.PANGOLIN_ENV = 'lint:js'

    lintJS(options.arguments)
      ? process.exit(0)
      : process.exit(1)
  }
}
968455
function consoleHandler(record) {
  if (typeof console === 'undefined' || !console) {
    return;
  }
  record = /** @type {!LogRecord} */(record);
  var timestamp = new Date(record.getMillis());
  var msg =
      '[' + timestamp.getUTCFullYear() + '-' +
      padNumber(timestamp.getUTCMonth() + 1, 2) + '-' +
      padNumber(timestamp.getUTCDate(), 2) + 'T' +
      padNumber(timestamp.getUTCHours(), 2) + ':' +
      padNumber(timestamp.getUTCMinutes(), 2) + ':' +
      padNumber(timestamp.getUTCSeconds(), 2) + 'Z]' +
      '[' + record.getLevel().name + ']' +
      '[' + record.getLoggerName() + '] ' +
      record.getMessage();

  var level = record.getLevel().value;
  if (level >= Logger.Level.SEVERE.value) {
    console.error(msg);
  } else if (level >= Logger.Level.WARNING.value) {
    console.warn(msg);
  } else {
    console.log(msg);
  }
}
452852
function configGen() {
  return {
    input: 'src/index.ts',
    output: {
      file: 'dist/web/buttplug.js',
      format: 'iife',
      name: "Buttplug"
    },
    plugins: [
      nodeResolve({
        jsnext: true,
        main: true,
        extensions: [ '.ts', '.js', '.json' ],
        browser: true
      }),
      typescript({ tsconfigOverride: { compilerOptions: { module: "ES2015" } } }),
      json(),
      nodeBuiltins(),
      nodeGlobals(),
      commonjs({
        // non-CommonJS modules will be ignored, but you can also
        // specifically include/exclude files
        include: ['../../node_modules/**', './node_modules/**'],  // Default: undefined
      }),
    ]
  };
}
794227
function compile(config) {
  let compiler;
  try {
    compiler = webpack(config);
  } catch (e) {
    console.log('Failed to compile: ', [e]); // eslint-disable-line
    process.exit(1);
  }
  return compiler;
}
1024222
function toPrintable(exclude, noColor) {
    var str = '{ ' + ( this._typeName ? 'T:' + this._typeName.bold : '');
    if (typeof exclude !== 'object') {
        noColor = exclude;
        exclude = {};
    }
    for (var prop in this) {
        if ('_' !== prop.charAt(0) && exclude[prop] !== true) {
            var pair = value2String(prop, this[prop], exclude[prop], noColor);
            if (pair.value !== undefined) {
                str = str.slice(-1) === ' ' ? str : str + ', ';
                str += (noColor ? pair.prop : pair.prop.bold.cyan) + ': ' + pair.value;
            }
        }
    }
    str += ' }';
    return str;
}
810429
def _none():
    """"""

    Mock = type("Mock", (), {"__getattr__": lambda Qt, attr: None})

    Qt.__binding__ = "None"
    Qt.__qt_version__ = "0.0.0"
    Qt.__binding_version__ = "0.0.0"
    Qt.QtCompat.loadUi = lambda uifile, baseinstance=None: None
    Qt.QtCompat.setSectionResizeMode = lambda *args, **kwargs: None

    for submodule in _common_members.keys():
        setattr(Qt, submodule, Mock())
        setattr(Qt, "_" + submodule, Mock())
83824
function ls (onEnd) {
  const FN      = require('fstream-npm')
  const color   = require('chalk')
  const glob    = require('glob')
  const exclude = require('lodash.difference')

  const included = [ ]

  const all = glob.sync('**/**', { ignore : [ 'node_modules/**/**' ], nodir : true })

  FN({ path: process.cwd() })
    .on('child', function (e) {
      included.push(e._path.replace(e.root.path + '/', ''))
    })
    .on('end', function () {
      const excluded = exclude(all, included)

      console.info(color.magenta('\n\nWILL BE PUBLISHED\n'))
      console.info(color.green(included.join('\n')))
      console.info(color.magenta('\n\nWON\'T BE PUBLISHED\n'))
      console.info(color.red(excluded.join('\n')))
      console.info('\n\nYou can use .npmignore and the "files" field of package.json to manage these files.')
      console.info('See https://docs.npmjs.com/misc/developers#keeping-files-out-of-your-package\n')

      if (typeof onEnd === 'function') {
        onEnd({
          included : included,
          excluded : excluded
        })
      }
    })
}
759820
function gulpHtmlLint(options) {
	let htmlLintOptions = {},
		issueFileCount = 0,
		issueCount = 0;

	options = options || {};
	options.htmllintrc = options.htmllintrc || '.htmllintrc';
	options.useHtmllintrc = options.useHtmllintrc !== false;
	options.plugins = options.plugins || [];
	options.limitFiles = options.limitFiles || (options.bail ? 1 : Number.MAX_VALUE);
	options.limitIssuesPerFile = options.limitIssuesPerFile || Number.MAX_VALUE;
	options.limitIssues = options.limitIssues || Number.MAX_VALUE;

	// load htmllint rules
	if (options.useHtmllintrc && fs.existsSync(options.htmllintrc)) {
		htmlLintOptions = JSON.parse(fs.readFileSync(options.htmllintrc, 'utf8'));
	}
	if (options.rules && typeof options.rules === 'object') {
		Object.keys(options.rules).forEach((prop) => {
			htmlLintOptions[prop] = options.rules[prop];
		});
	}

	// use plugins
	htmllint.use(options.plugins);

	return transform((file, enc, cb) => {
		if (file.isNull()) return cb(null, file);
		if (file.isStream()) return cb(new gutil.PluginError(PLUGIN_NAME, 'Streaming not supported'));
		if (issueFileCount >= options.limitFiles ||
			issueCount >= options.limitIssues) return cb(null, file);
		const relativeFilePath = path.relative(process.cwd(), file.path);
		htmllint(file.contents.toString(), htmlLintOptions)
			.then((issues) => {
				if (issues && issues.length) {
					let errorCount = 0,
						warningCount = 0;
					issueFileCount++;
					issueCount += issues.length;
					issues.forEach((issue) => {
						if (issue.code.indexOf('E') === 0) {
							issue.error = true;
							errorCount++;
						} else {
							issue.error = false;
							warningCount++;
						}
						issue.warning = !issue.error;
						issue.message = issue.message || htmllint.messages.renderIssue(issue);
					});
					file.htmlLint = {
						filePath: file.path,
						issues: issues.splice(0, Math.min(issues.length, options.limitIssuesPerFile)),
						relativeFilePath,
						errorCount,
						warningCount
					};
				}
				cb(null, file);
			}, () => {
				return cb(new gutil.PluginError(PLUGIN_NAME, `Could not lint html file: ${relativeFilePath}`));
			});
	});
}
396577
protected static String formatMDLInt(int x, int n) {
        char[] buf = new char[n];
        Arrays.fill(buf, ' ');
        String val = Integer.toString(x);
        if (val.length() > n)
            val = "0";
        int off = n - val.length();
        for (int i = 0; i < val.length(); i++)
            buf[off+i] = val.charAt(i);
        return new String(buf);
    }
647571
function Console (options = {}, handlers) {
  this.config = Object.assign({}, defaultOptions, options)
  this.history = []
  this.handlers = {}

  this.log(this.config.welcome)

  if (handlers) {
    for (let cmd in handlers) {
      this.register(cmd, handlers[cmd], handlers[cmd].config)
    }
  }

  this._render()

  return this
}
746203
function debug(name) {
  function disabled(){}
  disabled.enabled = false;

  var match = skips.some(function(re){
    return re.test(name);
  });

  if (match) return disabled;

  match = names.some(function(re){
    return re.test(name);
  });

  if (!match) return disabled;
  var c = color();

  function colored(fmt) {
    fmt = coerce(fmt);

    var curr = new Date;
    var ms = curr - (prev[name] || curr);
    prev[name] = curr;

    fmt = '  \u001b[9' + c + 'm' + name + ' '
      + '\u001b[3' + c + 'm\u001b[90m'
      + fmt + '\u001b[3' + c + 'm'
      + ' +' + humanize(ms) + '\u001b[0m';

    console.error.apply(this, arguments);
  }

  function plain(fmt) {
    fmt = coerce(fmt);

    fmt = new Date().toUTCString()
      + ' ' + name + ' ' + fmt;
    console.error.apply(this, arguments);
  }

  colored.enabled = plain.enabled = true;

  return isatty || process.env.DEBUG_COLORS
    ? colored
    : plain;
}
1354709
function printLintSummary(
  label: string,
  errors: number,
  warnings: number,
): void {
  const text = ` ${label}: ${errors} errors, ${warnings} warnings `

  let coloredText

  if (errors) {
    coloredText = chalk.white(chalk.bgRed(text))
  } else if (warnings) {
    coloredText = chalk.bgYellow(text)
  } else {
    coloredText = chalk.bgGreen(text)
  }

  const boldColoredText = chalk.bold(coloredText)

  console.log(`${boldColoredText}\n`)
}
839889
def console(self, ttynum=-1, stdinfd=0, stdoutfd=1, stderrfd=2, escape=1):
        

        if not self.running:
            return False

        return _lxc.Container.console(self, ttynum, stdinfd, stdoutfd,
                                      stderrfd, escape)