This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
i=$((0)) | |
for n in $(kubectl get -o=custom-columns=NAMESPACE:.metadata.namespace,KIND:.kind,NAME:.metadata.name pv,pvc,configmap,ingress,service,secret,deployment,statefulset,hpa,job,cronjob --all-namespaces | grep -v 'secrets/default-token') | |
do | |
if (( $i < 1 )); then | |
namespace=$n | |
i=$(($i+1)) | |
if [[ "$namespace" == "PersistentVolume" ]]; then | |
kind=$n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
Example Schema Validation | |
Assumes the DataFrame `df` is already populated with schema: | |
{id : int, day_cd : 8-digit code representing date, category : varchar(24), type : varchar(10), ind : varchar(1), purchase_amt : decimal(18,6) } | |
Runs various checks to ensure data is valid (e.g. no NULL id and day_cd fields) and schema is valid (e.g. [category] cannot be larger than varchar(24)) | |
''' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
daemon off; | |
worker_processes 1; | |
events { worker_connections 1024; } | |
http{ | |
sendfile on; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XPUT 'http://localhost:9200/us/user/1?pretty=1' -d ' | |
{ | |
"email" : "john@smith.com", | |
"name" : "John Smith", | |
"username" : "@john" | |
} | |
' | |
curl -XPUT 'http://localhost:9200/gb/user/2?pretty=1' -d ' | |
{ |