Skip to content

Instantly share code, notes, and snippets.

View dautovri's full-sized avatar
🌍

Ruslan Dautov dautovri

🌍
View GitHub Profile
@dautovri
dautovri / missOrNull.py
Created January 16, 2018 05:03
pyspark show all missing or null values in all columns of dataframe
df.select([count(when(isnan(c) | col(c).isNull(), c)).alias(c) for c in df.columns]).show()
@dautovri
dautovri / deleteall.sh
Created December 19, 2018 09:12
Script to delete all image and containers
#!/bin/bash
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)
@dautovri
dautovri / S3.sh
Last active September 28, 2019 10:08
AWS S3
# List all buckets
aws s3 ls
# List content of a bucket
aws s3 ls s3://<bucket>
# Create a bucket
aws s3 mb s3://<bucket>
# Copy into bucket
aws s3 cp <path> s3://<bucket>
# Copy from bucket
aws s3 cp s3://<bucket> <path>