text:
<?php
namespace Aws\Sfn;

use Aws\AwsClient;

/**
 * This client is used to interact with the **AWS Step Functions** service.
 * @method \Aws\Result createActivity(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createActivityAsync(array $args = [])
 * @method \Aws\Result createStateMachine(array $args = [])
 * @method \GuzzleHttp\Promise\Promise createStateMachineAsync(array $args = [])
 * @method \Aws\Result deleteActivity(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteActivityAsync(array $args = [])
 * @method \Aws\Result deleteStateMachine(array $args = [])
 * @method \GuzzleHttp\Promise\Promise deleteStateMachineAsync(array $args = [])
 * @method \Aws\Result describeActivity(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeActivityAsync(array $args = [])
 * @method \Aws\Result describeExecution(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeExecutionAsync(array $args = [])
 * @method \Aws\Result describeStateMachine(array $args = [])
 * @method \GuzzleHttp\Promise\Promise describeStateMachineAsync(array $args = [])
 * @method \Aws\Result getActivityTask(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getActivityTaskAsync(array $args = [])
 * @method \Aws\Result getExecutionHistory(array $args = [])
 * @method \GuzzleHttp\Promise\Promise getExecutionHistoryAsync(array $args = [])
 * @method \Aws\Result listActivities(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listActivitiesAsync(array $args = [])
 * @method \Aws\Result listExecutions(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listExecutionsAsync(array $args = [])
 * @method \Aws\Result listStateMachines(array $args = [])
 * @method \GuzzleHttp\Promise\Promise listStateMachinesAsync(array $args = [])
 * @method \Aws\Result sendTaskFailure(array $args = [])
 * @method \GuzzleHttp\Promise\Promise sendTaskFailureAsync(array $args = [])
 * @method \Aws\Result sendTaskHeartbeat(array $args = [])
 * @method \GuzzleHttp\Promise\Promise sendTaskHeartbeatAsync(array $args = [])
 * @method \Aws\Result sendTaskSuccess(array $args = [])
 * @method \GuzzleHttp\Promise\Promise sendTaskSuccessAsync(array $args = [])
 * @method \Aws\Result startExecution(array $args = [])
 * @method \GuzzleHttp\Promise\Promise startExecutionAsync(array $args = [])
 * @method \Aws\Result stopExecution(array $args = [])
 * @method \GuzzleHttp\Promise\Promise stopExecutionAsync(array $args = [])
 */
class SfnClient extends AwsClient {}

redpajama_set_name: RedPajamaGithub


text:
mineskinApp.controller("apiKeyController", ["$scope", "$http", "$cookies", "$timeout", "$stateParams", "$sce", "ngMeta", function ($scope, $http, $cookies, $timeout, $stateParams, $sce, ngMeta) {
    console.info("apiKeyController")

    console.log($stateParams);

    $scope.materializeInit('tab1');

    $scope.keyAction = "create";

    $scope.keyName = "";
    $scope.keyOrigins = "";
    $scope.keyIps = "";
    $scope.keyAgents = "";

    $scope.apiKey = "";
    $scope.apiSecret = "";

    window.__scope = $scope;

    $scope.loadLogin = function () {
        console.log('loadLogin')
        $timeout(function () {
            google.accounts.id.renderButton(document.getElementById('google_button_placeholder'), {
                locale: 'en',
                logo_alignment: 'left',
                shape: 'pill',
                size: 'large',
                text: 'continue_with',
                theme: 'filled_blue',
                type: 'standard'
            });
        }, 600);
        // google.accounts.id.prompt();
        // googleInit().then(()=>{
        //     google.accounts.id.renderButton(document.getElementById('google_button_placeholder'), {
        //         locale: 'en',
        //         logo_alignment: 'left',
        //         shape: 'pill',
        //         size: 'large',
        //         text: 'continue_with',
        //         theme: 'filled_blue',
        //         type: 'standard'
        //     });
        //     google.accounts.id.prompt();
        // })
    }

    $scope.loadAccount = function () {
        $scope.checkAccount(function (account) {
            if (!account) {
                $scope.loadLogin();
                return;
            }

            $scope.loadMinecraftAccounts();
            $scope.loadApiKeys();
        })
    };

    $scope.loadExistingKeyInfo = function () {
        if (!$scope.apiKey) return;

        $http({
            method: "GET",
            url: apiBaseUrl + `/apikey?key=${ $scope.apiKey }`,
            withCredentials: true,
        }).then(keyResponse => {
            $scope.server = keyResponse.data.server;
            $scope.apiKey = keyResponse.data.key;
            $scope.keyName = keyResponse.data.name;
            $scope.keyOrigins = keyResponse.data.origins.join("\n");
            $scope.keyIps = keyResponse.data.ips.join("\n");
            $scope.keyAgents = keyResponse.data.agents.join("\n");
        }).catch(response => $scope.handleResponseError(response));
    };

    $scope.create = function () {
        if ($scope.keyAction !== "create") return;
        console.log("create()");
        if (!$scope.mineskinAccount || !$scope.keyName) return;

        $http({
            method: "POST",
            url: apiBaseUrl + `/apikey`,
            withCredentials: true,
            data: {
                name: $scope.keyName,
                origins: $scope.keyOrigins.split("\n"),
                ips: $scope.keyIps.split("\n"),
                agents: $scope.keyAgents.split("\n")
            }
        }).then(keyResponse => {
            Materialize.toast(keyResponse.data.msg);

            $scope.keyName = keyResponse.data.name;
            $scope.apiKey = keyResponse.data.key;
            $scope.apiSecret = keyResponse.data.secret;
            $scope.keyOrigins = keyResponse.data.origins.join("\n");
            $scope.keyIps = keyResponse.data.ips.join("\n");
            $scope.keyAgents = keyResponse.data.agents.join("\n");

            $("html, body").animate({scrollTop: 0}, "slow");
        }).catch(response => $scope.handleResponseError(response));
    };

    $scope.update = function () {
        if ($scope.keyAction !== "update") return;
        console.log("update()");
        if (!$scope.apiKey || !$scope.apiSecret) return;

        $http({
            method: "PUT",
            url: apiBaseUrl + `/apikey`,
            withCredentials: true,
            data: {
                key: $scope.apiKey,
                secret: $scope.apiSecret,
                name: $scope.keyName,
                origins: $scope.keyOrigins.split("\n"),
                ips: $scope.keyIps.split("\n"),
                agents: $scope.keyAgents.split("\n")
            }
        }).then(response => {
            Materialize.toast(response.data.msg);
        }).catch(response => $scope.handleResponseError(response));
    };

    $scope.delete = function () {
        if ($scope.keyAction !== "delete") return;
        console.log("delete()");
        if (!$scope.apiKey || !$scope.apiSecret) return;

        $http({
            method: "DELETE",
            url: apiBaseUrl + `/apikey`,
            headers: {
                "Content-Type": "application/json;charset=utf-8"
            },
            withCredentials: true,
            data: {
                key: $scope.apiKey,
                secret: $scope.apiSecret
            }
        }).then(response => {
            Materialize.toast(response.data.msg);
        }).catch(response => $scope.handleResponseError(response));
    };

    /// UTIL

    $scope.handleResponseError = function (response) {
        if (response.data) {
            console.warn(response.data);
            Materialize.toast("Error: " + (response.data.msg || response.data.error));
        } else {
            console.warn(response.data);
        }
    }

}])


text:
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
'use strict';

const rule = require('../lib/check_license_header.js');
const ruleTester = new (require('eslint').RuleTester)({
  parserOptions: {ecmaVersion: 9, sourceType: 'module'},
  parser: require.resolve('@typescript-eslint/parser'),
});

ruleTester.run('check_license_header', rule, {
  valid: [
    {
      code: '',
      filename: 'front_end/empty.js',
    },
    {
      code: `
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as Action from './Action.js';
`,
      filename: 'front_end/ui/ui.js',
    },
    {
      code: `

const _loadedScripts = {};
`,
      filename: 'front_end/RuntimeInstantiator.js',
    },
    {
      code: `
/*
 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
 * Copyright (C) 2009 Joseph Pecoraro
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are
 * met:
 *
 *     * Redistributions of source code must retain the above copyright
 * notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above
 * copyright notice, this list of conditions and the following disclaimer
 * in the documentation and/or other materials provided with the
 * distribution.
 *     * Neither the name of Google Inc. nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

import * as Common from '../common/common.js';
`,
      filename: 'front_end/sdk/DOMModel.js',
    },
  ],

  invalid: [
    {
      code: 'import * as Action from \'./Action.js\';',
      filename: 'front_end/ui/ui.js',
      errors: [{message: 'Missing license header'}],
      output: `// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as Action from './Action.js';`,
    },
    {
      code: `
// Copyright incorrect header

import * as Action from './Action.js';
`,
      filename: 'front_end/ui/ui.js',
      errors: [{message: 'Incorrect line license header'}],
      output: `
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Copyright incorrect header

import * as Action from './Action.js';
`,
    },
    {
      code: `// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

(async function() {})();`,
      filename: 'test/webtests/http/tests/devtools/a11y-axe-core/sources/call-stack-a11y-test.js',
      errors: [{message: 'Incorrect line license header'}],
      output: `// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Copyright 2019 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.

(async function() {})();`
    },
    {
      code: `
// Copyright 2020 The Chromium Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as Action from './Action.js';
`,
      filename: 'front_end/ui/ui.js',
      errors: [{message: 'Incorrect line license header'}],
      output: `
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// Copyright 2020 The Chromium Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import * as Action from './Action.js';
`,
    },
    {
      code: `
/*
 * Some other comment
 */

import * as Action from './Action.js';
`,
      filename: 'front_end/ui/ui.js',
      errors: [{message: 'Incorrect block license header'}],
      output: `
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

/*
 * Some other comment
 */

import * as Action from './Action.js';
`,
    },
    {
      code: `
interface StringConstructor {
  sprintf(format: string, ...var_arg: any): string;
  hashCode(id: string): number;
}

interface Array<T> {
  peekLast(): T | undefined;
  lowerBound(object: T, comparator: {(a:T, b:T):number}): number;
}

// Type alias for the Closure-supported ITemplateArray which is equivalent
// to TemplateStringsArray in TypeScript land
type ITemplateArray = TemplateStringsArray

interface String {
  trimEndWithMaxLength(maxLength: number): string;
}
`,
      filename: 'front_end/legacy/legacy-defs.d.ts',
      errors: [{message: 'Missing license header'}],
      output: `
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

interface StringConstructor {
  sprintf(format: string, ...var_arg: any): string;
  hashCode(id: string): number;
}

interface Array<T> {
  peekLast(): T | undefined;
  lowerBound(object: T, comparator: {(a:T, b:T):number}): number;
}

// Type alias for the Closure-supported ITemplateArray which is equivalent
// to TemplateStringsArray in TypeScript land
type ITemplateArray = TemplateStringsArray

interface String {
  trimEndWithMaxLength(maxLength: number): string;
}
`,
    }
  ]
});