Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion samples/prediction/README
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Before you can run the prediction sample prediction.py, you must load some csv
formatted data into Google Storage. You can do this by running setup.sh with a
bucket/object name of your choice. You must first create the bucket you want
to use. This can be done with the gsutil function or via the web UI (Storage
to use. This can be done with gcloud storage or via the web UI (Storage

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For improved clarity, it would be better to explicitly mention that gcloud storage is a command. The previous text 'gsutil function' was also imprecise. I'd suggest adding 'the' and 'command' around 'gcloud storage'.

to use. This can be done with the gcloud storage command or via the web UI (Storage

Access) in the Google APIs Console.

api: prediction
Expand Down
2 changes: 1 addition & 1 deletion samples/prediction/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# can be downloaded from https://code.google.com/apis/storage/docs/gsutil.html
FILE_NAME=$1
OBJECT_NAME=$2
gsutil cp $FILE_NAME gs://$OBJECT_NAME
gcloud storage cp $FILE_NAME gs://$OBJECT_NAME

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The shell script arguments $FILE_NAME and $OBJECT_NAME should be double-quoted. This prevents issues like word splitting and pathname expansion if the file or object names contain spaces or other special characters. It's a crucial shell scripting practice for robustness and security.

Suggested change
gcloud storage cp $FILE_NAME gs://$OBJECT_NAME
gcloud storage cp "$FILE_NAME" "gs://$OBJECT_NAME"

Loading