Skip to content

Instantly share code, notes, and snippets.

View tuffacton's full-sized avatar
👋

Nic Acton tuffacton

👋
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tuffacton
tuffacton / iris.csv
Last active March 24, 2020 22:33
Helper files for HW3
sepal_length sepal_width petal_length petal_width species
4.3 3 1.1 0.1 1
4.4 2.9 1.4 0.2 1
4.4 3 1.3 0.2 1
4.4 3.2 1.3 0.2 1
4.5 2.3 1.3 0.3 1
4.6 3.1 1.5 0.2 1
4.6 3.2 1.4 0.2 1
4.6 3.4 1.4 0.3 1
4.6 3.6 1 0.2 1
Zurich Class Spot Size Spot Dist Activity Evolution Prev Activity Historical New Historical Area Spot Area C class M class X class
C S O 1 2 1 1 2 1 2 0 0 0
D S O 1 3 1 1 2 1 2 0 0 0
C S O 1 3 1 1 2 1 1 0 0 0
D S O 1 3 1 1 2 1 2 0 0 0
D A O 1 3 1 1 2 1 2 0 0 0
D A O 1 2 1 1 2 1 2 0 0 0
D A O 1 2 1 1 2 1 1 0 0 0
D A O 1 2 1 1 2 1 2 0 0 0
D K O 1 3 1 1 2 1 2 0 0 0
@tuffacton
tuffacton / decision_trees.ipynb
Last active February 21, 2020 01:53
Decision Tree exercises from ECE 5984 class, you'll need the Shirt.xlsx file to re-generate.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tuffacton
tuffacton / data_analysis_base.ipynb
Last active February 21, 2020 00:41
Use this Colaboratory notebook as a baseline to quickly upload and profile a dataset to get a quick exploration of all the variables.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tuffacton
tuffacton / remove_images.sh
Last active February 21, 2020 01:26
Remove all docker images that follow a certain pattern.
#!/bin/bash
pattern = $0
docker images -a | grep "$pattern" | awk '{print $3}' | xargs docker rmi
@tuffacton
tuffacton / zsh_timer.sh
Created January 22, 2020 03:10
A quick, explicit time-command to monitor to debug your zsh startup performance.
#!/bin/bash
/usr/bin/time zsh -i -c exit
@tuffacton
tuffacton / troubleshoot.sh
Last active November 17, 2019 16:39
An accessible and comprehensive troubleshooting script, iteratively added by the community, that has clear & transparent steps using only baked-in linux tools.
#!/bin/bash
echo "Welcome to the troubleshooting script!"
echo "Every item produced by this script will be pushed to a file called 'ts_session.txt'"
echo "We will narrate this script as it proceeds, you can transparently see every action it takes."
echo "First we want to know how much RAM your VM has:"
sleep 4
echo "RAM information" >> ts_session.txt
cat /proc/meminfo | head -n 1 >> ts_session.txt
@tuffacton
tuffacton / list.md
Created November 15, 2019 21:22
S3 listing techniques

List just the filenames from two buckets and diff them to see the difference

aws s3 ls s3://bucket-1 --recursive | awk '{$1=$2=$3=""; print $0}' | sed 's/^[ \t]*//' | sort > bucket_1_files
aws s3 ls s3://bucket-2 --recursive | awk '{$1=$2=$3=""; print $0}' | sed 's/^[ \t]*//' | sort > bucket_2_files

diff bucket_1_files bucket_2_files
@tuffacton
tuffacton / wordpress.txt
Last active November 8, 2019 15:27
Wordpress Installation
sudo yum update -y
sudo amazon-linux-extras install -y lamp-mariadb10.2-php7.2 php7.2
sudo yum install -y httpd
sudo systemctl start httpd
sudo systemctl enable httpd
wget https://wordpress.org/latest.tar.gz
tar -xzf latest.tar.gz
sudo cp -r wordpress/* /var/www/html/
cd /var/www/html/
sudo cp wordpress/wp-config-sample.php wordpress/wp-config.php