Skip to content

Commit f333c6b

Browse files
JustinBeckwithAce Nassri
authored and
Ace Nassri
committed
refactor: clean up samples and tests (#272)
1 parent 78e71a6 commit f333c6b

File tree

132 files changed

+2054
-2206
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+2054
-2206
lines changed

automl/language/entity-extraction/create-dataset.v1beta1.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
datasetName = 'YOUR_DATASET_NAME'
2120
) {
2221
// [START automl_natural_language_entity_create_dataset]
23-
const automl = require(`@google-cloud/automl`);
24-
const util = require(`util`);
22+
const automl = require('@google-cloud/automl');
23+
const util = require('util');
2524
const client = new automl.v1beta1.AutoMlClient();
2625

2726
/**

automl/language/entity-extraction/create-model.v1beta1.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
datasetId = 'YOUR_DATASET_NAME',
2120
modelName = 'YOUR_MODEL_NAME'
2221
) {
2322
// [START automl_natural_language_entity_create_model]
24-
const automl = require(`@google-cloud/automl`);
23+
const automl = require('@google-cloud/automl');
2524
const client = new automl.v1beta1.AutoMlClient();
2625

2726
/**

automl/language/entity-extraction/delete-dataset.v1beta1.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
datasetId = 'YOUR_DATASET_ID'
2120
) {
2221
// [START automl_natural_language_entity_delete_dataset]
23-
const automl = require(`@google-cloud/automl`);
22+
const automl = require('@google-cloud/automl');
2423
const client = new automl.v1beta1.AutoMlClient();
2524

2625
/**

automl/language/entity-extraction/delete-model.v1beta1.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
1516

16-
`use strict`;
17-
`use strict`;
1817
async function main(
1918
projectId = 'YOUR_PROJECT_ID',
2019
computeRegion = 'YOUR_REGION_NAME',
2120
modelId = 'YOUR_MODEL_ID'
2221
) {
2322
// [START automl_natural_language_entity_delete_model]
24-
const automl = require(`@google-cloud/automl`);
23+
const automl = require('@google-cloud/automl');
2524
const client = new automl.v1beta1.AutoMlClient();
2625

2726
/**

automl/language/entity-extraction/deploy-model.v1beta1.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
modelId = 'YOUR_MODEL_ID'
2120
) {
2221
// [START automl_natural_language_entity_deploy_model]
23-
const automl = require(`@google-cloud/automl`);
22+
const automl = require('@google-cloud/automl');
2423
const client = new automl.v1beta1.AutoMlClient();
2524

2625
/**

automl/language/entity-extraction/display-evaluation.v1beta1.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,28 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
1516

16-
`use strict`;
1717
async function main(
1818
projectId = 'YOUR_PROJECT_ID',
1919
computeRegion = 'YOUR_REGION_NAME',
2020
modelId = 'YOUR_MODEL_ID',
2121
filter = 'YOUR_FILTER_EXPRESSION'
2222
) {
2323
// [START automl_natural_language_entity_display_evaluation]
24-
const automl = require(`@google-cloud/automl`);
25-
const math = require(`mathjs`);
24+
const automl = require('@google-cloud/automl');
25+
const math = require('mathjs');
2626
const client = new automl.v1beta1.AutoMlClient();
2727

2828
/**

automl/language/entity-extraction/export-data.v1beta1.js

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
datasetId = 'YOUR_DATASET_ID',
2120
gcsOutputUri = 'GCS_OUTPUT_URI'
2221
) {
2322
// [START automl_natural_language_entity_export_data]
24-
const automl = require(`@google-cloud/automl`);
23+
const automl = require('@google-cloud/automl');
2524
const client = new automl.v1beta1.AutoMlClient();
2625

2726
/**

automl/language/entity-extraction/get-dataset.v1beta1.js

+17-17
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
'use strict';
1516

16-
`use strict`;
1717
async function main(
1818
projectId = 'YOUR_PROJECT_ID',
1919
computeRegion = 'YOUR_REGION_NAME',
2020
datasetId = 'YOUR_DATASET_ID'
2121
) {
2222
// [START automl_natural_language_entity_get_dataset]
23-
const automl = require(`@google-cloud/automl`);
24-
const util = require(`util`);
23+
const automl = require('@google-cloud/automl');
24+
const util = require('util');
2525
const client = new automl.v1beta1.AutoMlClient();
2626

2727
/**

automl/language/entity-extraction/get-model-evaluation.v1beta1.js

+16-17
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,27 @@
1-
/**
2-
* Copyright 2019, Google LLC
3-
* Licensed under the Apache License, Version 2.0 (the "License");
4-
* you may not use this file except in compliance with the License.
5-
* You may obtain a copy of the License at
6-
*
7-
* http://www.apache.org/licenses/LICENSE-2.0
8-
*
9-
* Unless required by applicable law or agreed to in writing, software
10-
* distributed under the License is distributed on an "AS IS" BASIS,
11-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
* See the License for the specific language governing permissions and
13-
* limitations under the License.
14-
*/
1+
// Copyright 2019 Google LLC
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// https://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
1514

16-
`use strict`;
15+
'use strict';
1716
async function main(
1817
projectId = 'YOUR_PROJECT_ID',
1918
computeRegion = 'YOUR_REGION_NAME',
2019
modelId = 'YOUR_MODEL_ID',
2120
modelEvaluationId = 'YOUR_MODEL_EVALUATION_ID'
2221
) {
2322
// [START automl_natural_language_entity_get_model_evaluation]
24-
const automl = require(`@google-cloud/automl`);
25-
const math = require(`mathjs`);
23+
const automl = require('@google-cloud/automl');
24+
const math = require('mathjs');
2625
const client = new automl.v1beta1.AutoMlClient();
2726

2827
/**

0 commit comments

Comments
 (0)