Skip to content

Commit

Permalink
Multiple updates (GoogleCloudPlatform#2399)
Browse files Browse the repository at this point in the history
- Comment update in tutorials/cloud-functions-avro-import-bq/index.js
- Comments updates in tutorials/dlp-hybrid-inspect/src/main/java/com/example/dlp/HybridInspectSql.java
- Comment update in tutorials/dlp-to-datacatalog-tags/src/main/java/com/example/dlp/DlpDataCatalogTagsTutorial.java
- Message update in update in tutorials/gcp-cos-basic-fim/scan.sh
- Comment update in tutorials/ml-pipeline-with-workflows/babyweight_model/trainer/model.py
- Message update in tutorials/ml-pipeline-with-workflows/services/preprocess/main.py
- Message update in tutorials/ml-pipeline-with-workflows/services/train/main.py
- Comment update in tutorials/pci-tokenizer/index.js
- Comment update in tutorials/pci-tokenizer/src/app.js
- Comments updates in tutorials/prestashop-gke/php-nginx/7.3-fpm-alpine/config/php-fpm/php-fpm.d/www.conf
  • Loading branch information
bluPhy authored May 31, 2023
1 parent 95284d5 commit 7524785
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion tutorials/cloud-functions-avro-import-bq/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ exports.ToBigQuery_Stage = (event, callback) => {
// Do not use the ftp_files Bucket to ensure that the bucket does not get crowded.
// Change bucket to gas_ddr_files_staging
// Set the table name (TableId) to the full file name including date,
// this will give each table a new distinct name and we can keep a record of all of the files recieved.
// this will give each table a new distinct name and we can keep a record of all of the files received.
// This may not be the best way to do this... at some point we will need to archive and delete prior records.
const dashOffset = filename.indexOf('-');
const tableId = filename.substring(0, dashOffset) + '_STAGE';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ private static Integer inspectSQLDb(
System.out.println();
System.out.print(String.format(">> [%s,%s:%s]: Starting Inspection", database.databaseInstanceDescription, database.databaseInstanceServer, database.databaseName));

//retreive the password from Secret Manager
//retrieve the password from Secret Manager
final String databasePassword = accessSecretVersion(ServiceOptions.getDefaultProjectId(),
database.getSecretManagerResourceName(),"latest");

Expand All @@ -323,7 +323,7 @@ private static Integer inspectSQLDb(
String dbVersion = String.format("%s[%s]", dbMetadata.getDatabaseProductName(),
dbMetadata.getDatabaseProductVersion());

// this will list out all tables in the curent schama
// this will list out all tables in the current schama
ResultSet ListTablesResults = dbMetadata
.getTables(conn.getCatalog(), null, "%", new String[]{"TABLE"});

Expand Down Expand Up @@ -540,10 +540,10 @@ public static String accessSecretVersion(String projectId, String secretId, Stri
}

/**
* Because this script may be connecting to mulitple JDBC drivers in the same run, this method helps ensure that the drivers are registered
* Because this script may be connecting to multiple JDBC drivers in the same run, this method helps ensure that the drivers are registered
*/
private static java.sql.Driver getJdbcDriver (String databaseType){
// Based on the SQL database type, reguster the driver. Note the pom.xml must have a
// Based on the SQL database type, register the driver. Note the pom.xml must have a
// matching driver for these to work. This addresses driver not found issues when
// trying to scan more than one JDBC type.
try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ private static List getMaxRows(List rows, int startRow, int headerCount) throws
return subRows;
}

// this methods calcualtes the total bytes of a list of rows.
// this methods calculates the total bytes of a list of rows.
public static int getBytesFromList(List list) throws IOException {
java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
java.io.ObjectOutputStream out = new java.io.ObjectOutputStream(baos);
Expand Down
2 changes: 1 addition & 1 deletion tutorials/gcp-cos-basic-fim/scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ mkdir -p $DATDIR $TMPDIR $LOGDIR

# Fail fast if already running
if [ -f "$LOCKFILE" ];then
echo "A scan is already in progess." | tee -a $LOGFILE
echo "A scan is already in progress." | tee -a $LOGFILE
exit
fi
touch $LOCKFILE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def read_dataset(data_dir, prefix, pattern, batch_size=512, eval=False):


def get_wide_deep():
# defin model inputs
# define model inputs
inputs = {}
inputs['is_male'] = layers.Input(shape=(), name='is_male', dtype='string')
inputs['plurality'] = layers.Input(shape=(), name='plurality', dtype='string')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

@app.route('/')
def index():
return 'A service to Submit a traing job for the babyweight-keras example. '
return 'A service to Submit a training job for the babyweight-keras example. '


@app.route('/api/v1/job/<string:job_id>', methods=['GET'])
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

@app.route('/')
def index():
return 'A service to Submit a traing job for the babyweight-keras example. '
return 'A service to Submit a training job for the babyweight-keras example. '


@app.route('/api/v1/job/<string:job_id>', methods=['GET'])
Expand Down
2 changes: 1 addition & 1 deletion tutorials/pci-tokenizer/index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Boostrap for Cloud Functions
// Bootstrap for Cloud Functions
require('./src/server.js');
2 changes: 1 addition & 1 deletion tutorials/pci-tokenizer/src/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
Main applicaiton script for the card data tokenizer. Called by server.js.
Main application script for the card data tokenizer. Called by server.js.
See ../index.md for usage info and Apache 2.0 license
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ listen = 127.0.0.1:9000
; process.priority = -19

; Set the process dumpable flag (PR_SET_DUMPABLE prctl) even if the process user
; or group is differrent than the master process user. It allows to create process
; or group is different than the master process user. It allows to create process
; core dump and ptrace the process for the pool user.
; Default Value: no
; process.dumpable = yes
Expand Down Expand Up @@ -269,13 +269,13 @@ pm.max_spare_servers = 3
; %d: time taken to serve the request
; it can accept the following format:
; - %{seconds}d (default)
; - %{miliseconds}d
; - %{milliseconds}d
; - %{mili}d
; - %{microseconds}d
; - %{micro}d
; %e: an environment variable (same as $_ENV or $_SERVER)
; it must be associated with embraces to specify the name of the env
; variable. Some exemples:
; variable. Some examples:
; - server specifics like: %{REQUEST_METHOD}e or %{SERVER_PROTOCOL}e
; - HTTP headers like: %{HTTP_HOST}e or %{HTTP_USER_AGENT}e
; %f: script filename
Expand Down Expand Up @@ -374,7 +374,7 @@ pm.max_spare_servers = 3

; Redirect worker stdout and stderr into main error log. If not set, stdout and
; stderr will be redirected to /dev/null according to FastCGI specs.
; Note: on highloaded environement, this can cause some delay in the page
; Note: on highloaded environment, this can cause some delay in the page
; process time (several ms).
; Default Value: no
;catch_workers_output = yes
Expand Down

0 comments on commit 7524785

Please sign in to comment.