File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33spark = SparkSession .builder .master ("local" ).appName ("SQL" ).getOrCreate ()
44df = spark .read .load ('data/containers_tiny.parquet' )
55df .select ("ship_imo" , "container_id" , "net_weight" ).show ()
6+
Original file line number Diff line number Diff line change 1+ .PHONY : watch
2+ watch :
3+ ./live.sh
4+
5+ .PHONY : auth
6+ auth :
7+ docker run -ti --name gcloud-config google/cloud-sdk gcloud auth login
8+
9+ .PHONY : set-project
10+ set-project :
11+ ./gcloud config set project bigdataupv2021
12+
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ docker run --rm -ti --volumes-from gcloud-config google/cloud-sdk gcloud " $@ "
3+
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ docker run --rm --volumes-from gcloud-config -w /tmp/current -v $( pwd) :/tmp/current google/cloud-sdk gsutil " $@ "
3+
Original file line number Diff line number Diff line change @@ -5,8 +5,8 @@ fswatch ../live.py | while read -r fpath; do \
55 echo -e " \033[0;36mRELOAD\033[0m $fpath $( date +" %H%M%S" ) "
66 echo -e " # $( date +" %H:%M:%S" ) \n" | cat - ../live.py > live_mod.py
77 sed -e ' /-python">/r./live_mod.py' live_template.html > live.html
8- gsutil -h " Cache-Control:no-cache,max-age=0" \
9- cp live.html gs://bigdata.luisbelloch.es/en_directo.html
8+ ./ gsutil -h " Cache-Control:no-cache,max-age=0" \
9+ cp /tmp/current/ live.html gs://bigdata.luisbelloch.es/en_directo.html
1010
1111 # echo -e "# $(date +"%H:%M:%S")\n" | cat - live.py | pygmentize -f html -O full,linenos=1 -o live.html
1212 # scp live.html root@live.luisbelloch.es:/var/www/html/index.html
You can’t perform that action at this time.
0 commit comments