Skip to content

Instantly share code, notes, and snippets.

View peripheralmike's full-sized avatar

Mike Smith peripheralmike

View GitHub Profile
import pandas as pd
# Imagine this is our box of mixed LEGO pieces.
df = pd.DataFrame({'Color': ['Red', 'Blue', 'Blue', 'Green', 'Green', 'Green'],
'Shape': ['Square', 'Square', 'Circle', 'Circle', 'Triangle', 'Triangle']})
# Here's how we remove the duplicates.
df = df.drop_duplicates()
print(df)
import pandas as pd
import random
from faker import Faker
# Initialize Faker
fake = Faker()
# Function to generate synthetic medical data
def generate_synthetic_medical_data(num_records):
# List to hold the data
@peripheralmike
peripheralmike / docker-install
Last active July 1, 2019 14:13
Run this as a block (or when starting a linux machine in AWS for example) to have Docker install in line with the os and in one big command rather than several
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo apt-get update
#!/bin/bash
IP=$(hostname -i)
echo $IP
export IP